Struct fuel_core_storage::StorageMut
pub struct StorageMut<'a, T, Type>(_, _)
where
T: 'a + ?Sized,
Type: Mappable;
Expand description
The wrapper around the storage that supports methods from StorageInspect
and StorageMutate
.
Implementations§
§impl<'a, T, Type> StorageMut<'a, T, Type>where
T: StorageInspect<Type>,
Type: Mappable,
impl<'a, T, Type> StorageMut<'a, T, Type>where T: StorageInspect<Type>, Type: Mappable,
pub fn get( self, key: &<Type as Mappable>::Key ) -> Result<Option<Cow<'a, <Type as Mappable>::OwnedValue>>, <T as StorageInspect<Type>>::Error>
pub fn contains_key( self, key: &<Type as Mappable>::Key ) -> Result<bool, <T as StorageInspect<Type>>::Error>
§impl<'a, T, Type> StorageMut<'a, T, Type>where
T: StorageMutate<Type>,
Type: Mappable,
impl<'a, T, Type> StorageMut<'a, T, Type>where T: StorageMutate<Type>, Type: Mappable,
pub fn insert( self, key: &<Type as Mappable>::Key, value: &<Type as Mappable>::Value ) -> Result<Option<<Type as Mappable>::OwnedValue>, <T as StorageInspect<Type>>::Error>
pub fn remove( self, key: &<Type as Mappable>::Key ) -> Result<Option<<Type as Mappable>::OwnedValue>, <T as StorageInspect<Type>>::Error>
§impl<'a, T, Type> StorageMut<'a, T, Type>where
Type: Mappable,
impl<'a, T, Type> StorageMut<'a, T, Type>where Type: Mappable,
pub fn root<Key>( self, key: &Key ) -> Result<[u8; 32], <T as StorageInspect<Type>>::Error>where T: MerkleRootStorage<Key, Type>,
Auto Trait Implementations§
impl<'a, T: ?Sized, Type> RefUnwindSafe for StorageMut<'a, T, Type>where T: RefUnwindSafe, Type: RefUnwindSafe,
impl<'a, T: ?Sized, Type> Send for StorageMut<'a, T, Type>where T: Send, Type: Send,
impl<'a, T: ?Sized, Type> Sync for StorageMut<'a, T, Type>where T: Sync, Type: Sync,
impl<'a, T: ?Sized, Type> Unpin for StorageMut<'a, T, Type>where Type: Unpin,
impl<'a, T, Type> !UnwindSafe for StorageMut<'a, T, Type>
Blanket Implementations§
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