Trait fuel_storage::StorageMutate
source · [−]pub trait StorageMutate<Type: Mappable>: StorageInspect<Type> {
fn insert(
&mut self,
key: &Type::Key,
value: &Type::SetValue
) -> Result<Option<Type::GetValue>, Self::Error>;
fn remove(
&mut self,
key: &Type::Key
) -> Result<Option<Type::GetValue>, Self::Error>;
}
Expand description
Base storage trait for Fuel infrastructure.
Generic should implement Mappable
trait with all storage type information.
Required Methods
Append Key->Value
mapping to the storage.
If Key
was already mappped to a value, return the replaced value as Ok(Some(Value))
. Return
Ok(None)
otherwise.