[−][src]Struct bcrypt_small::WorkFactor
A bcrypt work factor.
Methods
impl WorkFactor
[src]
pub const EXP4: WorkFactor
[src]
pub const EXP5: WorkFactor
[src]
pub const EXP6: WorkFactor
[src]
pub const EXP7: WorkFactor
[src]
pub const EXP8: WorkFactor
[src]
pub const EXP9: WorkFactor
[src]
pub const EXP10: WorkFactor
[src]
pub const EXP11: WorkFactor
[src]
pub const EXP12: WorkFactor
[src]
pub const EXP13: WorkFactor
[src]
pub const EXP14: WorkFactor
[src]
pub const EXP15: WorkFactor
[src]
pub const EXP16: WorkFactor
[src]
pub const EXP17: WorkFactor
[src]
pub const EXP18: WorkFactor
[src]
pub const EXP19: WorkFactor
[src]
pub const EXP20: WorkFactor
[src]
pub const EXP21: WorkFactor
[src]
pub const EXP22: WorkFactor
[src]
pub const EXP23: WorkFactor
[src]
pub const EXP24: WorkFactor
[src]
pub const EXP25: WorkFactor
[src]
pub const EXP26: WorkFactor
[src]
pub const EXP27: WorkFactor
[src]
pub const EXP28: WorkFactor
[src]
pub const EXP29: WorkFactor
[src]
pub const EXP30: WorkFactor
[src]
pub const EXP31: WorkFactor
[src]
pub fn exp(log_rounds: u32) -> Option<WorkFactor>
[src]
Creates a bcrypt work factor from a typical base-2 exponent between 4 and 31 (inclusive). The number of rounds is 2**log_rounds
.
pub const fn log_rounds(self) -> u32
[src]
The base-2 logarithm of the number of rounds represented by this work factor.
pub const fn linear_rounds(self) -> u32
[src]
The number of rounds represented by this work factor.
Trait Implementations
impl PartialEq<WorkFactor> for WorkFactor
[src]
fn eq(&self, other: &WorkFactor) -> bool
[src]
fn ne(&self, other: &WorkFactor) -> bool
[src]
impl Debug for WorkFactor
[src]
impl Clone for WorkFactor
[src]
fn clone(&self) -> WorkFactor
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for WorkFactor
[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Ord for WorkFactor
[src]
fn cmp(&self, other: &WorkFactor) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
🔬 This is a nightly-only experimental API. (
clamp
)Restrict a value to a certain interval. Read more
impl Copy for WorkFactor
[src]
impl PartialOrd<WorkFactor> for WorkFactor
[src]
fn partial_cmp(&self, other: &WorkFactor) -> Option<Ordering>
[src]
fn lt(&self, other: &WorkFactor) -> bool
[src]
fn le(&self, other: &WorkFactor) -> bool
[src]
fn gt(&self, other: &WorkFactor) -> bool
[src]
fn ge(&self, other: &WorkFactor) -> bool
[src]
impl Eq for WorkFactor
[src]
Auto Trait Implementations
impl Unpin for WorkFactor
impl Send for WorkFactor
impl Sync for WorkFactor
impl RefUnwindSafe for WorkFactor
impl UnwindSafe for WorkFactor
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,