pub struct VacantEntryRaw<S> { /* private fields */ }
Expand description

A view into a vacant entry in a HasStateApi type. It is part of the EntryRaw enum.

Differs from VacantEntry in that this has access to the raw bytes stored in the state via a HasStateEntry type.

Implementations

Gets a reference to the key that would be used when inserting a value through the VacantEntryRaw.

Sets the value of the entry with the VacantEntryRaw’s key.

Sets the value of the entry with the VacantEntryRaw’s key. This differs from insert_raw in that it automatically serializes the provided value. insert should be preferred for values that can be directly converted to byte arrays, e.g., any value that implements AsRef<[u8]>.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.