[−][src]Struct catwalk::Catwalk
A Catwalk acts as a common interface to a serializer and a persistence engine.
Fields
serializer: S
p_engine: P
Implementations
impl<S, P> Catwalk<S, P> where
S: Serializer,
P: PersistenceEngine,
[src]
S: Serializer,
P: PersistenceEngine,
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]
&self,
StoredModel { model: model, version: version }: StoredModel<M>
) -> Result<M>
Auto Trait Implementations
impl<S, P> RefUnwindSafe for Catwalk<S, P> where
P: RefUnwindSafe,
S: RefUnwindSafe,
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, P> Send for Catwalk<S, P> where
P: Send,
S: Send,
P: Send,
S: Send,
impl<S, P> Sync for Catwalk<S, P> where
P: Sync,
S: Sync,
P: Sync,
S: Sync,
impl<S, P> Unpin for Catwalk<S, P> where
P: Unpin,
S: Unpin,
P: Unpin,
S: Unpin,
impl<S, P> UnwindSafe for Catwalk<S, P> where
P: UnwindSafe,
S: UnwindSafe,
P: UnwindSafe,
S: UnwindSafe,
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,
pub 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, 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.
pub 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>,