pub struct MemoryRepository<M = InMemoryMetadataStore> { /* private fields */ }Implementations§
Source§impl<M> MemoryRepository<M>where
M: MetadataStore,
impl<M> MemoryRepository<M>where
M: MetadataStore,
pub fn new(metadata: M) -> Self
pub fn with_rows(self, entity: impl Into<String>, rows: Vec<Record>) -> Self
pub fn seed(&mut self, entity: impl Into<String>, rows: Vec<Record>)
pub fn fetch_all( &self, query: &SelectQuery, ) -> Result<Vec<Record>, RepositoryError<MemoryRepositoryError>>
pub fn fetch_smart_list( &self, query: &SelectQuery, ) -> Result<SmartList<Record>, RepositoryError<MemoryRepositoryError>>
pub fn fetch_entities<T>(
&self,
query: &SelectQuery,
) -> Result<SmartList<T>, RepositoryError<MemoryRepositoryError>>where
T: Entity,
pub fn insert( &self, command: &InsertCommand, ) -> Result<u64, RepositoryError<MemoryRepositoryError>>
pub fn update( &self, command: &UpdateCommand, ) -> Result<u64, RepositoryError<MemoryRepositoryError>>
pub fn delete( &self, command: &DeleteCommand, ) -> Result<u64, RepositoryError<MemoryRepositoryError>>
pub fn recover( &self, command: &RecoverCommand, ) -> Result<u64, RepositoryError<MemoryRepositoryError>>
Trait Implementations§
Source§impl<M: Clone> Clone for MemoryRepository<M>
impl<M: Clone> Clone for MemoryRepository<M>
Source§fn clone(&self) -> MemoryRepository<M>
fn clone(&self) -> MemoryRepository<M>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<M> Freeze for MemoryRepository<M>where
M: Freeze,
impl<M> RefUnwindSafe for MemoryRepository<M>where
M: RefUnwindSafe,
impl<M> Send for MemoryRepository<M>where
M: Send,
impl<M> Sync for MemoryRepository<M>where
M: Sync,
impl<M> Unpin for MemoryRepository<M>where
M: Unpin,
impl<M> UnsafeUnpin for MemoryRepository<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for MemoryRepository<M>where
M: UnwindSafe,
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