pub enum MemoryTier {
Nano,
Standard,
Sovereign,
}Expand description
Device memory tier — gates only the Argon2id KDF cost.
Variants§
Nano
IoT / Edge / RPi Zero: 8 MB, 2 iterations, 1 lane.
Standard
Mid-tier laptop / server: 64 MB, 3 iterations, 2 lanes.
Sovereign
Datacenter / high-security: 256 MB, 5 iterations, 4 lanes.
Implementations§
Source§impl MemoryTier
impl MemoryTier
Sourcepub fn argon2_params(self, output_len: usize) -> Params
pub fn argon2_params(self, output_len: usize) -> Params
Return Argon2id parameters for this tier.
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Get the recommended buffer size for this tier
Sourcepub fn should_lock(&self) -> bool
pub fn should_lock(&self) -> bool
Whether memory should be locked (mlock)
Trait Implementations§
Source§impl Clone for MemoryTier
impl Clone for MemoryTier
Source§fn clone(&self) -> MemoryTier
fn clone(&self) -> MemoryTier
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MemoryTier
Source§impl Debug for MemoryTier
impl Debug for MemoryTier
Source§impl Default for MemoryTier
impl Default for MemoryTier
Source§fn default() -> MemoryTier
fn default() -> MemoryTier
Returns the “default value” for a type. Read more
impl Eq for MemoryTier
Source§impl PartialEq for MemoryTier
impl PartialEq for MemoryTier
impl StructuralPartialEq for MemoryTier
Auto Trait Implementations§
impl Freeze for MemoryTier
impl RefUnwindSafe for MemoryTier
impl Send for MemoryTier
impl Sync for MemoryTier
impl Unpin for MemoryTier
impl UnsafeUnpin for MemoryTier
impl UnwindSafe for MemoryTier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more