pub struct InMemoryChatRepository { /* private fields */ }Expand description
In-memory repository — fine for examples and tests.
Implementations§
Source§impl InMemoryChatRepository
impl InMemoryChatRepository
pub fn new() -> InMemoryChatRepository
Trait Implementations§
Source§impl ChatRepository for InMemoryChatRepository
impl ChatRepository for InMemoryChatRepository
fn find_by_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
connection: &'life1 ChatConnection,
) -> Pin<Box<dyn Future<Output = Option<Entity<ChatData>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryChatRepository: 'async_trait,
fn find_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Entity<ChatData>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryChatRepository: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
chat: &'life1 Entity<ChatData>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryChatRepository: 'async_trait,
Source§impl Debug for InMemoryChatRepository
impl Debug for InMemoryChatRepository
Source§impl Default for InMemoryChatRepository
impl Default for InMemoryChatRepository
Source§fn default() -> InMemoryChatRepository
fn default() -> InMemoryChatRepository
Returns the “default value” for a type. Read more
Source§impl IsSingleton for InMemoryChatRepository
DI helper — pair with register_singletons!(&c, InMemoryChatRepository).
impl IsSingleton for InMemoryChatRepository
DI helper — pair with register_singletons!(&c, InMemoryChatRepository).
fn register_in(c: &Container)
Auto Trait Implementations§
impl !Freeze for InMemoryChatRepository
impl !RefUnwindSafe for InMemoryChatRepository
impl Send for InMemoryChatRepository
impl Sync for InMemoryChatRepository
impl Unpin for InMemoryChatRepository
impl UnsafeUnpin for InMemoryChatRepository
impl UnwindSafe for InMemoryChatRepository
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