[−][src]Struct kv_crud_memory::InMemoryStorage
In-memory storage manages it's data in simple hash map
Methods
impl<K, V> InMemoryStorage<K, V> where
K: Hash + Eq,
V: Entity<K>,
[src]
K: Hash + Eq,
V: Entity<K>,
Trait Implementations
impl<K: Default, V: Default> Default for InMemoryStorage<K, V> where
K: Hash + Eq,
V: Entity<K>,
[src]
K: Hash + Eq,
V: Entity<K>,
fn default() -> InMemoryStorage<K, V>
[src]
impl<K, V, '_> From<&'_ V> for InMemoryStorage<K, V> where
K: Hash + Eq,
V: Entity<K>,
[src]
K: Hash + Eq,
V: Entity<K>,
impl<K, V, '_> From<&'_ Vec<V>> for InMemoryStorage<K, V> where
K: Hash + Eq,
V: Entity<K>,
[src]
K: Hash + Eq,
V: Entity<K>,
impl<K, V> Create<K, V> for InMemoryStorage<K, V> where
K: Hash + Eq,
V: Entity<K>,
[src]
K: Hash + Eq,
V: Entity<K>,
type Error = InMemoryStorageError
fn save(&mut self, entity: &V) -> Result<(), InMemoryStorageError>
[src]
impl<K, V> Read<K, V> for InMemoryStorage<K, V> where
K: Hash + Eq + ToString,
V: Entity<K>,
[src]
K: Hash + Eq + ToString,
V: Entity<K>,
type Error = InMemoryStorageError
fn find_by_id(&self, id: &K) -> Result<V, InMemoryStorageError>
[src]
impl<K, V> ReadWithPaginationAndSort<K, V> for InMemoryStorage<K, V> where
K: Hash + Eq + ToString,
V: Entity<K> + Ord,
[src]
K: Hash + Eq + ToString,
V: Entity<K> + Ord,
type Error = InMemoryStorageError
fn find_all_with_page(
&self,
page: &Page
) -> Result<Vec<V>, InMemoryStorageError>
[src]
&self,
page: &Page
) -> Result<Vec<V>, InMemoryStorageError>
fn find_all_with_page_and_sort(
&self,
page: &Page,
sort: &Sort
) -> Result<Vec<V>, InMemoryStorageError>
[src]
&self,
page: &Page,
sort: &Sort
) -> Result<Vec<V>, InMemoryStorageError>
impl<K, V> Update<K, V> for InMemoryStorage<K, V> where
K: Hash + Eq,
V: Entity<K>,
[src]
K: Hash + Eq,
V: Entity<K>,
impl<K, V> Delete<K, V> for InMemoryStorage<K, V> where
K: Hash + Eq,
V: Entity<K>,
[src]
K: Hash + Eq,
V: Entity<K>,
type Error = InMemoryStorageError
fn remove_by_id(&mut self, id: &K) -> Result<(), Self::Error>
[src]
fn remove(&mut self, entity: &V) -> Result<(), Self::Error>
[src]
impl<K, V> Crud<K, V> for InMemoryStorage<K, V> where
K: Hash + Eq + ToString,
V: Entity<K> + Ord,
[src]
K: Hash + Eq + ToString,
V: Entity<K> + Ord,
Auto Trait Implementations
impl<K, V> Send for InMemoryStorage<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for InMemoryStorage<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,