[][src]Struct catwalk::Catwalk

pub struct Catwalk<S, P> where
    S: Serializer,
    P: PersistenceEngine
{ pub serializer: S, pub p_engine: P, }

A Catwalk acts as a common interface to a serializer and a persistence engine.

Fields

serializer: Sp_engine: P

Implementations

impl<S, P> Catwalk<S, P> where
    S: Serializer,
    P: PersistenceEngine
[src]

pub fn new(serializer: S, p_engine: P) -> Self[src]

pub fn store<M: Model>(&mut self, model: &M) -> Result<()>[src]

pub fn get<M: Model>(&mut self, key: &str) -> Result<Option<M>>[src]

pub fn check_version<M: Model>(
    &self,
    StoredModel { model: model, version: version }: StoredModel<M>
) -> Result<M>
[src]

Auto Trait Implementations

impl<S, P> RefUnwindSafe for Catwalk<S, P> where
    P: RefUnwindSafe,
    S: RefUnwindSafe

impl<S, P> Send for Catwalk<S, P> where
    P: Send,
    S: Send

impl<S, P> Sync for Catwalk<S, P> where
    P: Sync,
    S: Sync

impl<S, P> Unpin for Catwalk<S, P> where
    P: Unpin,
    S: Unpin

impl<S, P> UnwindSafe for Catwalk<S, P> where
    P: UnwindSafe,
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.