pub trait StorageInspect<Type: Mappable> {
    type Error;

    // Required methods
    fn get(
        &self,
        key: &Type::Key
    ) -> Result<Option<Cow<'_, Type::OwnedValue>>, Self::Error>;
    fn contains_key(&self, key: &Type::Key) -> Result<bool, Self::Error>;
}
Expand description

Base read storage trait for Fuel infrastructure.

Generic should implement Mappable trait with all storage type information.

Required Associated Types§

Required Methods§

source

fn get( &self, key: &Type::Key ) -> Result<Option<Cow<'_, Type::OwnedValue>>, Self::Error>

Retrieve Cow<Value> such as Key->Value.

source

fn contains_key(&self, key: &Type::Key) -> Result<bool, Self::Error>

Return true if there is a Key mapping to a value in the storage.

Implementations on Foreign Types§

source§

impl<'a, T: StorageInspect<Type> + ?Sized, Type: Mappable> StorageInspect<Type> for &'a mut T

§

type Error = <T as StorageInspect<Type>>::Error

source§

fn get( &self, key: &Type::Key ) -> Result<Option<Cow<'_, Type::OwnedValue>>, Self::Error>

source§

fn contains_key(&self, key: &Type::Key) -> Result<bool, Self::Error>

source§

impl<'a, T: StorageInspect<Type> + ?Sized, Type: Mappable> StorageInspect<Type> for &'a T

§

type Error = <T as StorageInspect<Type>>::Error

source§

fn get( &self, key: &Type::Key ) -> Result<Option<Cow<'_, Type::OwnedValue>>, Self::Error>

source§

fn contains_key(&self, key: &Type::Key) -> Result<bool, Self::Error>

Implementors§