Struct oasis_contract_sdk_storage::cell::PublicCell
source · pub struct PublicCell<'key, T> { /* private fields */ }
Expand description
A storage cell identifies a storage key of a specific type.
Implementations§
source§impl<'key, T> PublicCell<'key, T>
impl<'key, T> PublicCell<'key, T>
source§impl<'key, T> PublicCell<'key, T>where
T: Decode,
impl<'key, T> PublicCell<'key, T>where
T: Decode,
sourcepub fn get(&self, store: &dyn PublicStore) -> Option<T>
pub fn get(&self, store: &dyn PublicStore) -> Option<T>
Return the current value of the storage cell.
§Panics
The method will panic in case the raw cell value cannot be deserialized.
source§impl<'key, T> PublicCell<'key, T>where
T: Encode,
impl<'key, T> PublicCell<'key, T>where
T: Encode,
sourcepub fn set(&self, store: &mut dyn PublicStore, value: T)
pub fn set(&self, store: &mut dyn PublicStore, value: T)
Set the value of the storage cell.
Auto Trait Implementations§
impl<'key, T> Freeze for PublicCell<'key, T>
impl<'key, T> RefUnwindSafe for PublicCell<'key, T>where
T: RefUnwindSafe,
impl<'key, T> Send for PublicCell<'key, T>where
T: Send,
impl<'key, T> Sync for PublicCell<'key, T>where
T: Sync,
impl<'key, T> Unpin for PublicCell<'key, T>where
T: Unpin,
impl<'key, T> UnwindSafe for PublicCell<'key, T>where
T: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more