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.

Variants

Vacant(VacantEntry)

A vacant entry that holds the index to the next and previous vacant entry.

Occupied(T)

An occupied entry that hold the value.

Implementations

Returns true if the entry is occupied.

Returns true if the entry is vacant.

Trait Implementations

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.

Calculates the encoded size. Read more

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

The footprint of the type. 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.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

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

Performs the conversion.

Performs the conversion.

Return an encoding of Self prepended by given slice.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.