[][src]Struct bcrypt_small::WorkFactor

pub struct 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]

impl Debug for WorkFactor[src]

impl Clone for 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_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for WorkFactor[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.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]

impl Eq for WorkFactor[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]