pub struct MemoryStorage { /* private fields */ }Implementations§
Source§impl MemoryStorage
impl MemoryStorage
pub fn new() -> Self
pub fn new_with_hooks(hooks: Vec<Arc<dyn StorageHooks>>) -> Self
Trait Implementations§
Source§impl Clone for MemoryStorage
impl Clone for MemoryStorage
Source§impl Debug for MemoryStorage
impl Debug for MemoryStorage
Source§impl Default for MemoryStorage
impl Default for MemoryStorage
Source§impl Storage<User> for MemoryStorage
impl Storage<User> for MemoryStorage
fn id(&self) -> String
fn user_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_user<'life0, 'async_trait>(
&'life0 self,
user: CreateUser,
email_address: CreateEmailAddressWithoutUserId,
) -> Pin<Box<dyn Future<Output = Result<User, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_user<'life0, 'async_trait>(
&'life0 self,
user: UpdateUser,
) -> Pin<Box<dyn Future<Output = Result<User, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn email_address_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
email_address_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<EmailAddress>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_email_address<'life0, 'async_trait>(
&'life0 self,
email_address: CreateEmailAddress,
) -> Pin<Box<dyn Future<Output = Result<EmailAddress, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_email_address<'life0, 'async_trait>(
&'life0 self,
email_address: UpdateEmailAddress,
) -> Pin<Box<dyn Future<Output = Result<EmailAddress, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_email_address<'life0, 'life1, 'async_trait>(
&'life0 self,
email_address_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryStorage
impl !UnwindSafe for MemoryStorage
impl Forget for MemoryStorage
impl Freeze for MemoryStorage
impl Move for MemoryStorage
impl Send for MemoryStorage
impl Sync for MemoryStorage
impl Unpin for MemoryStorage
impl UnsafeUnpin for MemoryStoragewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Arc<dyn StorageHooks>>: UnsafeUnpin,
*const ArcInner<Mutex<Vec<User>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Vec<User>>>>: UnsafeUnpin,
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