Struct concordium_std::OccupiedEntry
source · pub struct OccupiedEntry<'a, K, V: Serial, S: HasStateApi> { /* private fields */ }
Expand description
A view into an occupied entry in a StateMap
. It can be obtained via the
StateMap::entry
method. This allows looking up or modifying the value at
a give key in-place.
The type implements DerefMut
which allows the
value to be mutated. The Drop
implementation ensures
that the value is properly stored in the contract state maintained by the
node.
This differs from OccupiedEntryRaw
in that this automatically handles
serialization and provides convenience methods for modifying the value via
the DerefMut
implementation.