pub struct InMemoryUserDetailsService { /* private fields */ }Expand description
In-memory implementation of UserDetailsService.
Useful for testing or small applications.
Implementations§
Trait Implementations§
Source§impl Clone for InMemoryUserDetailsService
impl Clone for InMemoryUserDetailsService
Source§fn clone(&self) -> InMemoryUserDetailsService
fn clone(&self) -> InMemoryUserDetailsService
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for InMemoryUserDetailsService
impl Default for InMemoryUserDetailsService
Source§fn default() -> InMemoryUserDetailsService
fn default() -> InMemoryUserDetailsService
Returns the “default value” for a type. Read more
Source§impl UserDetailsManager for InMemoryUserDetailsService
impl UserDetailsManager for InMemoryUserDetailsService
Source§fn create_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
) -> Pin<Box<dyn Future<Output = Result<(), UserDetailsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryUserDetailsService: 'async_trait,
fn create_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
) -> Pin<Box<dyn Future<Output = Result<(), UserDetailsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryUserDetailsService: 'async_trait,
Create a new user.
Source§fn update_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
) -> Pin<Box<dyn Future<Output = Result<(), UserDetailsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryUserDetailsService: 'async_trait,
fn update_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
) -> Pin<Box<dyn Future<Output = Result<(), UserDetailsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryUserDetailsService: 'async_trait,
Update an existing user.
Source§fn delete_user<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), UserDetailsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryUserDetailsService: 'async_trait,
fn delete_user<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), UserDetailsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryUserDetailsService: 'async_trait,
Delete a user by username.
Source§fn change_password<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
username: &'life1 str,
_old_password: &'life2 str,
new_password: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), UserDetailsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
InMemoryUserDetailsService: 'async_trait,
fn change_password<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
username: &'life1 str,
_old_password: &'life2 str,
new_password: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), UserDetailsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
InMemoryUserDetailsService: 'async_trait,
Change user’s password. Read more
Source§impl UserDetailsService for InMemoryUserDetailsService
impl UserDetailsService for InMemoryUserDetailsService
Source§fn load_user_by_username<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, UserDetailsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryUserDetailsService: 'async_trait,
fn load_user_by_username<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, UserDetailsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryUserDetailsService: 'async_trait,
Load user by username. Read more
Auto Trait Implementations§
impl Freeze for InMemoryUserDetailsService
impl !RefUnwindSafe for InMemoryUserDetailsService
impl Send for InMemoryUserDetailsService
impl Sync for InMemoryUserDetailsService
impl Unpin for InMemoryUserDetailsService
impl !UnwindSafe for InMemoryUserDetailsService
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> 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