[−][src]Struct cw_storage::ReadonlyBucket
Implementations
impl<'a, S: ReadonlyStorage, T> ReadonlyBucket<'a, S, T> where
T: Serialize + DeserializeOwned,
[src]
T: Serialize + DeserializeOwned,
pub fn new(namespace: &[u8], storage: &'a S) -> Self
[src]
pub fn multilevel(namespaces: &[&[u8]], storage: &'a S) -> Self
[src]
pub fn load(&self, key: &[u8]) -> Result<T>
[src]
load will return an error if no data is set at the given key, or on parse error
pub fn may_load(&self, key: &[u8]) -> Result<Option<T>>
[src]
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
Auto Trait Implementations
impl<'a, S, T> RefUnwindSafe for ReadonlyBucket<'a, S, T> where
S: RefUnwindSafe,
T: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, S, T> Send for ReadonlyBucket<'a, S, T> where
S: Sync,
T: Sync,
S: Sync,
T: Sync,
impl<'a, S, T> Sync for ReadonlyBucket<'a, S, T> where
S: Sync,
T: Sync,
S: Sync,
T: Sync,
impl<'a, S, T> Unpin for ReadonlyBucket<'a, S, T>
impl<'a, S, T> UnwindSafe for ReadonlyBucket<'a, S, T> where
S: RefUnwindSafe,
T: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
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<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.
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>,