[−][src]Struct canonical_host::MemStore
An in-memory store implemented with a hashmap
Implementations
impl MemStore
[src]
Trait Implementations
impl Clone for MemStore
[src]
impl Debug for MemStore
[src]
impl Default for MemStore
[src]
impl Store for MemStore
[src]
type Ident = Id32
The identifier used for allocations
type Error = MemError
The error the store can emit
fn fetch(&self, id: &Self::Ident, into: &mut [u8]) -> Result<(), Self::Error>
[src]
fn get<T: Canon<Self>>(&self, id: &Self::Ident) -> Result<T, Self::Error>
[src]
fn put<T: Canon<Self>>(&self, t: &T) -> Result<Self::Ident, Self::Error>
[src]
fn put_raw(&self, bytes: &[u8]) -> Result<Self::Ident, Self::Error>
[src]
fn ident<T>(t: &T) -> Self::Ident where
T: Canon<Self>,
[src]
T: Canon<Self>,
Auto Trait Implementations
impl !RefUnwindSafe for MemStore
impl Send for MemStore
impl Sync for MemStore
impl Unpin for MemStore
impl !UnwindSafe for MemStore
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<S> Canon<S> for S where
S: Store,
[src]
S: Store,
fn write(&self, &mut impl Sink<S>) -> Result<(), <S as Store>::Error>
[src]
fn read(source: &mut impl Source<S>) -> Result<S, <S as Store>::Error>
[src]
fn encoded_len(&self) -> usize
[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>,