[−][src]Struct mdl::bcache::Cache
BTreeMap cache. This struct implements the Store trait so it can be used to cache Model structs A BTreeMap is used to store the data in memory. This struct implements clone so it can be shared between threads safely creating a clone
Implementations
impl Cache
[src]
Trait Implementations
impl Clone for Cache
[src]
impl Store for Cache
[src]
fn push(&self, db: &'static str, key: &str, value: Vec<u8>) -> Result<(), Error>
[src]
fn pull<F, T>(
&self,
db: &'static str,
key: &str,
formatter: F
) -> Result<T, Error> where
F: Fn(&[u8]) -> Result<T, Error>,
[src]
&self,
db: &'static str,
key: &str,
formatter: F
) -> Result<T, Error> where
F: Fn(&[u8]) -> Result<T, Error>,
fn iter<F>(&self, db: &'static str, prefix: &str, f: F) -> Result<(), Error> where
F: Fn(&[u8]) -> Continue,
[src]
F: Fn(&[u8]) -> Continue,
fn rm(&self, db: &'static str, key: &str) -> Result<(), Error>
[src]
fn all<F, T>(
&self,
db: &'static str,
prefix: &str,
formatter: F
) -> Result<Vec<T>, Error> where
F: Fn(&[u8]) -> Result<T, Error>,
[src]
&self,
db: &'static str,
prefix: &str,
formatter: F
) -> Result<Vec<T>, Error> where
F: Fn(&[u8]) -> Result<T, Error>,
Auto Trait Implementations
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,