pub struct PasswordAccountsBuilder { /* private fields */ }Expand description
Options for PasswordAccounts; every one has a default.
Implementations§
Source§impl PasswordAccountsBuilder
impl PasswordAccountsBuilder
Sourcepub fn table(self, table: Arc<dyn Table<AccountRecord>>) -> Self
pub fn table(self, table: Arc<dyn Table<AccountRecord>>) -> Self
Keeps the accounts in table instead of in memory.
Sourcepub fn max_accounts(self, max: usize) -> Self
pub fn max_accounts(self, max: usize) -> Self
The most accounts the table may hold. Default DEFAULT_MAX_ACCOUNTS.
Sourcepub fn record_limits(self, limits: RecordLimits) -> Self
pub fn record_limits(self, limits: RecordLimits) -> Self
How large an account’s fields may be. Default [RecordLimits::DEFAULT].
Sourcepub fn max_password_bytes(self, most: Limit) -> Self
pub fn max_password_bytes(self, most: Limit) -> Self
The longest password hashed or checked. Default [DEFAULT_MAX_PASSWORD_BYTES].
Sourcepub fn argon2(self, params: Argon2Params) -> Self
pub fn argon2(self, params: Argon2Params) -> Self
The Argon2id costs new passwords are hashed with, and the dummy hash is made with.
Default: [Argon2Params::default] (19 MiB, 2 passes, 1 lane). Stored hashes keep the
costs they were made with.
Sourcepub fn build(self) -> Result<PasswordAccounts, SourceError>
pub fn build(self) -> Result<PasswordAccounts, SourceError>
Loads the table and makes the provider.
§Errors
Returns an error when the table cannot be loaded or holds an invalid or duplicated account.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PasswordAccountsBuilder
impl !UnwindSafe for PasswordAccountsBuilder
impl Freeze for PasswordAccountsBuilder
impl Send for PasswordAccountsBuilder
impl Sync for PasswordAccountsBuilder
impl Unpin for PasswordAccountsBuilder
impl UnsafeUnpin for PasswordAccountsBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more