[−][src]Struct cosmwasm_storage::ReadonlyBucket
Implementations
impl<'a, S, T> ReadonlyBucket<'a, S, T> where
S: ReadonlyStorage,
T: Serialize + DeserializeOwned,
[src]
S: ReadonlyStorage,
T: Serialize + DeserializeOwned,
pub fn new(storage: &'a S, namespace: &[u8]) -> Self
[src]
pub fn multilevel(storage: &'a S, namespaces: &[&[u8]]) -> Self
[src]
pub fn load(&self, key: &[u8]) -> StdResult<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]) -> StdResult<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: Send,
S: Sync,
T: Send,
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> where
T: Unpin,
T: Unpin,
impl<'a, S, T> UnwindSafe for ReadonlyBucket<'a, S, T> where
S: RefUnwindSafe,
T: UnwindSafe,
S: RefUnwindSafe,
T: 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>,