Struct cw_storage_plus::Path [−][src]
pub struct Path<T> where
T: Serialize + DeserializeOwned, { /* fields omitted */ }
Implementations
save will serialize the model and store, returns an error on serialization issues
load will return an error if no data is set at the given key, or on parse error
may_load will parse the data stored at the key if present, returns Ok(None) if no data there. returns an error on issues parsing
has returns true or false if any data is at this key, without parsing or interpreting the contents. It will returns true for an length-0 byte array (Some(b““)), if you somehow manage to set that.
Loads the data, perform the specified action, and store the result in the database. This is shorthand for some common sequences, which may be useful.
If the data exists, action(Some(value))
is called. Otherwise action(None)
is called.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Path<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Path<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more