Struct oasis_contract_sdk_storage::map::PublicMap
source · pub struct PublicMap<'key, K, V> { /* private fields */ }
Expand description
A map backed by contract storage.
Implementations§
source§impl<'key, K, V> PublicMap<'key, K, V>where
K: MapKey,
V: Encode + Decode,
impl<'key, K, V> PublicMap<'key, K, V>where
K: MapKey,
V: Encode + Decode,
sourcepub fn get(&self, store: &dyn PublicStore, key: K) -> Option<V>
pub fn get(&self, store: &dyn PublicStore, key: K) -> Option<V>
Lookup a given key.
sourcepub fn insert(&self, store: &mut dyn PublicStore, key: K, value: V)
pub fn insert(&self, store: &mut dyn PublicStore, key: K, value: V)
Insert a given key/value pair.
sourcepub fn remove(&self, store: &mut dyn PublicStore, key: K)
pub fn remove(&self, store: &mut dyn PublicStore, key: K)
Remove a given key.
Auto Trait Implementations§
impl<'key, K, V> Freeze for PublicMap<'key, K, V>
impl<'key, K, V> RefUnwindSafe for PublicMap<'key, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'key, K, V> Send for PublicMap<'key, K, V>
impl<'key, K, V> Sync for PublicMap<'key, K, V>
impl<'key, K, V> Unpin for PublicMap<'key, K, V>
impl<'key, K, V> UnwindSafe for PublicMap<'key, K, V>where
K: UnwindSafe,
V: 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