Trait ink_storage::traits::PackedLayout [−][src]
pub trait PackedLayout: SpreadLayout + Encode + Decode {
fn pull_packed(&mut self, at: &Key);
fn push_packed(&self, at: &Key);
fn clear_packed(&self, at: &Key);
}
Expand description
Types that can be stored to and loaded from a single contract storage cell.
Required methods
fn pull_packed(&mut self, at: &Key)
fn pull_packed(&mut self, at: &Key)
Indicates to self
that is has just been pulled from the storage.
Note
Most types will have to implement a trivial forwarding to their fields.
However, some types such as storage::Box
are required to perform some special handling upon receiving this signal.
fn push_packed(&self, at: &Key)
fn push_packed(&self, at: &Key)
Indicates to self
that it is about to be pushed to contract storage.
Note
Most types will have to implement a trivial forwarding to their fields.
However, some types such as storage::Box
are required to perform some special handling upon receiving this signal.
fn clear_packed(&self, at: &Key)
fn clear_packed(&self, at: &Key)
Indicates to self
that it is about to be cleared from contract storage.
Note
Most types will have to implement a trivial forwarding to their fields.
However, some types such as storage::Box
are required to perform some special handling upon receiving this signal.