Expand description
Operation on runtime child storages.
This module is a currently only a variant of unhashed with additional child_info
.
Structs§
- Multi
Removal Results - Results concerning an operation to remove many keys.
Enums§
- Child
Info - Information related to a child state.
- Child
Type - Type of child. It does not strictly define different child type, it can also be related to technical consideration or api variant.
- Kill
Storage Result - The outcome of calling
storage_kill
. Returned value is the number of storage items removed from the backend from making thestorage_kill
call. - State
Version - Different possible state version.
Functions§
- clear_
storage - Partially clear the child storage of each key-value pair.
- exists
- Check to see if
key
has an explicit entry in storage. - get
- Return the value of the item in storage under
key
, orNone
if there is no explicit entry. - get_or
- Return the value of the item in storage under
key
, ordefault_value
if there is no explicit entry. - get_
or_ default - Return the value of the item in storage under
key
, or the type’s default if there is no explicit entry. - get_
or_ else - Return the value of the item in storage under
key
, ordefault_value()
if there is no explicit entry. - get_raw
- Get a Vec of bytes from storage.
- kill
- Ensure
key
has no explicit entry in storage. - kill_
storage Deprecated - Remove all
storage_key
key/values - len
- Return the length in bytes of the value without reading it.
None
if it does not exist. - put
- Put
value
in storage underkey
. - put_raw
- Put a raw byte slice into storage.
- root
- Calculate current child root value.
- take
- Remove
key
from storage, returning its value if it had an explicit entry orNone
otherwise. - take_or
- Return the value of the item in storage under
key
, ordefault_value
if there is no explicit entry. Ensure there is no explicit entry on return. - take_
or_ default - Remove
key
from storage, returning its value, or, if there was no explicit entry in storage, the default for its type. - take_
or_ else - Return the value of the item in storage under
key
, ordefault_value()
if there is no explicit entry. Ensure there is no explicit entry on return.