pub enum EntryRaw<StateApi: HasStateApi> {
    Vacant(VacantEntryRaw<StateApi>),
    Occupied(OccupiedEntryRaw<StateApi>),
}
Expand description

A view into a single entry in a HasStateApi type, which may either be vacant or occupied.

This enum is constructed from the entry method on a HasStateApi type.

Variants

Vacant(VacantEntryRaw<StateApi>)

Occupied(OccupiedEntryRaw<StateApi>)

Implementations

Ensures a value is in the entry by inserting the default if empty, and returns the HasStateEntry type for the entry.

Ensures a value is in the entry by inserting the default if empty, and returns the HasStateEntry type. This differs from or_insert_raw in that it automatically serializes the provided value. or_insert should be preferred for values that can be directly converted to byte arrays, e.g., any value that implements AsRef<[u8]>.

Returns a reference to this entry’s key.

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.