Struct fuel_core_storage::StorageRef
pub struct StorageRef<'a, T, Type>(_, _)
where
T: 'a + ?Sized,
Type: Mappable;
Expand description
The wrapper around the storage that supports only methods from StorageInspect
.
Implementations§
§impl<'a, T, Type> StorageRef<'a, T, Type>where
T: StorageInspect<Type>,
Type: Mappable,
impl<'a, T, Type> StorageRef<'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> StorageRef<'a, T, Type>where
Type: Mappable,
impl<'a, T, Type> StorageRef<'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 StorageRef<'a, T, Type>where T: RefUnwindSafe, Type: RefUnwindSafe,
impl<'a, T: ?Sized, Type> Send for StorageRef<'a, T, Type>where T: Sync, Type: Send,
impl<'a, T: ?Sized, Type> Sync for StorageRef<'a, T, Type>where T: Sync, Type: Sync,
impl<'a, T: ?Sized, Type> Unpin for StorageRef<'a, T, Type>where Type: Unpin,
impl<'a, T: ?Sized, Type> UnwindSafe for StorageRef<'a, T, Type>where T: RefUnwindSafe, Type: UnwindSafe,
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