Expand description
Operation on runtime storage using hashed keys.
Functions§
- exists
- Check to see if
keyhas an explicit entry in storage. - get
- Return the value of the item in storage under
key, orNoneif there is no explicit entry. - get_or
- Return the value of the item in storage under
key, ordefault_valueif 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
keyhas no explicit entry in storage. - put
- Put
valuein storage underkey. - put_raw
- Put a raw byte slice into storage.
- take
- Remove
keyfrom storage, returning its value if it had an explicit entry orNoneotherwise. - take_or
- Return the value of the item in storage under
key, ordefault_valueif there is no explicit entry. Ensure there is no explicit entry on return. - take_
or_ default - Remove
keyfrom 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.