pub struct BcryptPasswordHasher { /* private fields */ }Implementations§
Source§impl BcryptPasswordHasher
impl BcryptPasswordHasher
pub fn new(cost: u32) -> Self
pub async fn hash(&self, password: &str) -> Result<String, PasswordHashError>
pub async fn verify( &self, password: &str, password_hash: &str, ) -> Result<bool, PasswordHashError>
pub fn needs_rehash( &self, password_hash: &str, ) -> Result<bool, PasswordHashError>
Trait Implementations§
Source§impl Clone for BcryptPasswordHasher
impl Clone for BcryptPasswordHasher
impl Copy for BcryptPasswordHasher
Source§impl Debug for BcryptPasswordHasher
impl Debug for BcryptPasswordHasher
Auto Trait Implementations§
impl Forget for BcryptPasswordHasher
impl Freeze for BcryptPasswordHasher
impl Move for BcryptPasswordHasher
impl RefUnwindSafe for BcryptPasswordHasher
impl Send for BcryptPasswordHasher
impl Sync for BcryptPasswordHasher
impl Unpin for BcryptPasswordHasher
impl UnsafeUnpin for BcryptPasswordHasher
impl UnwindSafe for BcryptPasswordHasher
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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