#[repr(transparent)]
pub struct OccupiedEntryRaw<StateApi: HasStateApi> { /* private fields */ }
Expand description

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

Differs from OccupiedEntry 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 OccupiedEntryRaw.

Gets a reference to the HasStateEntry type in the entry.

Converts the entry into its HasStateEntry type.

If you need multiple mutable references to the OccupiedEntryRaw, see get_mut.

Gets a mutable reference to the HasStateEntry type in the entry.

If you need access to a HasStateEntry, which can outlive the OccupiedEntryRaw, see get.

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

Sets the value of the entry with the OccupiedEntryRaw’s key. This differs from insert_raw in that it automatically serializes the value. The insert should be preferred if the value is already a byte array.

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.