[−][src]Struct prototty_monolithic_storage::MonoStorage
Methods
impl<S: StoreBytes> MonoStorage<S>
[src]
pub fn new(store_bytes: S) -> Self
[src]
pub fn from_bytes(bytes: &[u8], store_bytes: S) -> Option<Self>
[src]
pub fn from_bytes_or_empty(bytes: &[u8], store_bytes: S) -> Self
[src]
Trait Implementations
impl<S: StoreBytes> Storage for MonoStorage<S>
[src]
fn load<K, T>(&self, key: K) -> Result<T, LoadError> where
K: AsRef<str>,
T: DeserializeOwned,
[src]
K: AsRef<str>,
T: DeserializeOwned,
fn remove<K, T>(&mut self, key: K) -> Result<T, LoadError> where
K: AsRef<str>,
T: DeserializeOwned,
[src]
K: AsRef<str>,
T: DeserializeOwned,
fn load_raw<K>(&self, key: K) -> Result<Vec<u8>, LoadError> where
K: AsRef<str>,
[src]
K: AsRef<str>,
fn store_raw<K, V>(&mut self, key: K, value: V) -> Result<(), StoreError> where
K: AsRef<str>,
V: AsRef<[u8]>,
[src]
K: AsRef<str>,
V: AsRef<[u8]>,
fn remove_raw<K>(&mut self, key: K) -> Result<Vec<u8>, LoadError> where
K: AsRef<str>,
[src]
K: AsRef<str>,
fn exists<K>(&self, key: K) -> bool where
K: AsRef<str>,
[src]
K: AsRef<str>,
fn clear(&mut self)
[src]
fn store<K, T>(&mut self, key: K, value: &T) -> Result<(), StoreError> where
K: AsRef<str>,
T: Serialize,
[src]
K: AsRef<str>,
T: Serialize,
Auto Trait Implementations
impl<S> Send for MonoStorage<S> where
S: Send,
S: Send,
impl<S> Sync for MonoStorage<S> where
S: Sync,
S: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,