Struct fuel_storage::StorageMut
source · pub struct StorageMut<'a, T: 'a + ?Sized, Type: Mappable>(/* private fields */);
Expand description
The wrapper around the storage that supports methods from StorageInspect
and
StorageMutate
.
Implementations§
source§impl<'a, T: StorageInspect<Type>, Type: Mappable> StorageMut<'a, T, Type>
impl<'a, T: StorageInspect<Type>, Type: Mappable> StorageMut<'a, T, Type>
source§impl<'a, T: StorageMutate<Type>, Type: Mappable> StorageMut<'a, T, Type>
impl<'a, T: StorageMutate<Type>, Type: Mappable> StorageMut<'a, T, Type>
source§impl<'a, T, Type: Mappable> StorageMut<'a, T, Type>
impl<'a, T, Type: Mappable> StorageMut<'a, T, Type>
pub fn root<Key>(self, key: &Key) -> Result<MerkleRoot, T::Error>where
T: MerkleRootStorage<Key, Type>,
source§impl<'a, T: StorageWrite<Type>, Type: Mappable> StorageMut<'a, T, Type>
impl<'a, T: StorageWrite<Type>, Type: Mappable> StorageMut<'a, T, Type>
pub fn write(&mut self, key: &Type::Key, buf: &[u8]) -> Result<usize, T::Error>
pub fn replace(
&mut self,
key: &Type::Key,
buf: &[u8],
) -> Result<(usize, Option<Vec<u8>>), T::Error>where
T: StorageSize<Type>,
pub fn take(&mut self, key: &Type::Key) -> Result<Option<Vec<u8>>, T::Error>
Auto Trait Implementations§
impl<'a, T, Type> Freeze for StorageMut<'a, T, Type>where
T: ?Sized,
impl<'a, T, Type> RefUnwindSafe for StorageMut<'a, T, Type>
impl<'a, T, Type> Send for StorageMut<'a, T, Type>
impl<'a, T, Type> Sync for StorageMut<'a, T, Type>
impl<'a, T, Type> Unpin for StorageMut<'a, T, Type>
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