pub struct LazyOption<T> { /* private fields */ }
Expand description
An persistent lazy option, that stores a value in the storage.
Returns true
if the value is present in the storage.
Returns true
if the value is not present in the storage.
Create a new lazy option with the given storage_key
and the initial value.
Removes the value from storage without reading it.
Returns whether the value was present.
Removes the value from storage and returns it as an option.
Gets the value from storage and returns it as an option.
Sets the value into the storage without reading the previous value and returns whether the
previous value was present.
Replaces the value in the storage and returns the previous value as an option.
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes. Read more
Deserialize this instance from a slice of bytes.
Serialize this instance into a vector of bytes.
Formats the value using the given formatter. Read more
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
impl<T, U> Into<U> for T where
U: From<T>,
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>,