pub trait StorageMutate<Type: Mappable>: StorageInspect<Type> {
// Required methods
fn replace(
&mut self,
key: &Type::Key,
value: &Type::Value,
) -> Result<Option<Type::OwnedValue>, Self::Error>;
fn take(
&mut self,
key: &Type::Key,
) -> Result<Option<Type::OwnedValue>, Self::Error>;
// Provided methods
fn insert(
&mut self,
key: &Type::Key,
value: &Type::Value,
) -> Result<(), Self::Error> { ... }
fn remove(&mut self, key: &Type::Key) -> Result<(), Self::Error> { ... }
}
Expand description
Base storage trait for Fuel infrastructure.
Generic should implement Mappable
trait with all storage type information.