pub enum Entry<T> {
Vacant(VacantEntry),
Occupied(T),
}
Expand description
An entry within the stash.
The vacant entries within a storage stash form a doubly linked list of
vacant entries that is used to quickly re-use their vacant storage.
A vacant entry that holds the index to the next and previous vacant entry.
An occupied entry that hold the value.
Returns true
if the entry is occupied.
Returns true
if the entry is vacant.
Formats the value using the given formatter. Read more
Attempt to deserialise the value from input.
Attempt to skip the encoded value from input. Read more
Returns the fixed encoded size of the type. Read more
Convert self to a slice and append it to the destination.
If possible give a hint of expected size of the encoding. Read more
Convert self to an owned vector.
Convert self to a slice and then invoke the given closure with it.
Indicates to self
that is has just been pulled from the storage. Read more
Indicates to self
that it is about to be pushed to contract storage. Read more
Indicates to self
that it is about to be cleared from contract storage. Read more
Indicates whether a type requires deep clean-up of its state meaning that
a clean-up routine has to decode an entity into an instance in order to
eventually recurse upon its tear-down.
This is not required for the majority of primitive data types such as i32
,
however types such as storage::Box
that might want to forward the clean-up
procedure to their inner T
require a deep clean-up. Read more
Pulls an instance of Self
from the contract storage. Read more
Pushes an instance of Self
to the contract storage. Read more
Clears an instance of Self
from the contract storage. Read more
The type identifying for which type info is provided. Read more
Returns the static type identifier for Self
.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Decode Self
and consume all of the given input data. Read more
Decode Self
and consume all of the given input data. Read more
Decode Self
and advance input
by the number of bytes consumed. Read more
Decode Self
with the given maximum recursion depth. Read more
impl<T, U> Into<U> for T where
U: From<T>,
Return an encoding of Self
prepended by given slice.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,