pub trait Writable<S: Storage>: Readonly<S> {
fn storage_mut(&mut self) -> &mut S;
fn save<T: Serialize>(&mut self, key: &[u8], val: T) -> StdResult<&mut Self> { ... }
fn save_ns<T: Serialize>(
&mut self,
ns: &[u8],
key: &[u8],
val: T
) -> StdResult<&mut Self> { ... }
}
Expand description
Trait for actor that operates in a context with mutable storage
Required Methods
fn storage_mut(&mut self) -> &mut S
fn storage_mut(&mut self) -> &mut S
Get the mutable storage handle