pub struct KeysBuilder { /* private fields */ }Expand description
Options for Keys; every one has a default.
Implementations§
Source§impl KeysBuilder
impl KeysBuilder
Sourcepub fn table(self, table: Arc<dyn Table<KeyRecord>>) -> Self
pub fn table(self, table: Arc<dyn Table<KeyRecord>>) -> Self
Keeps the keys in table instead of in memory.
Sourcepub fn prefix(self, prefix: impl Into<String>) -> Self
pub fn prefix(self, prefix: impl Into<String>) -> Self
What every key made here begins with, so a key is recognized where it turns up and
nothing else is looked up among them. Default DEFAULT_PREFIX.
Sourcepub fn key_hash(self, hash: KeyHash) -> Self
pub fn key_hash(self, hash: KeyHash) -> Self
How keys made from now on are kept. Default [KeyHash::Sha256]. Keys already in the
table keep the algorithm their stored string names.
Sourcepub fn max_keys(self, max: usize) -> Self
pub fn max_keys(self, max: usize) -> Self
The most keys the table may hold. Default DEFAULT_MAX_KEYS.
Sourcepub fn record_limits(self, limits: RecordLimits) -> Self
pub fn record_limits(self, limits: RecordLimits) -> Self
How large a key account’s fields may be. Default [RecordLimits::DEFAULT].
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for KeysBuilder
impl !UnwindSafe for KeysBuilder
impl Freeze for KeysBuilder
impl Send for KeysBuilder
impl Sync for KeysBuilder
impl Unpin for KeysBuilder
impl UnsafeUnpin for KeysBuilder
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