Module sp_io::storage

source ·
Expand description

Interface for accessing the storage from within the runtime.

Structs§

  • Provides implementations for the extern host functions.

Functions§

  • Append the encoded value to the storage item at key.
  • Always returns None. This function exists for compatibility reasons.
  • Clear the storage of the given key and its value.
  • Clear the storage of each key-value pair where the key starts with the given prefix.
  • Commit the last transaction started by start_transaction.
  • Check whether the given key exists in storage.
  • Returns the data for key in the storage or None if the key can not be found.
  • Get the next key in storage after the given one in lexicographic order.
  • Get key from storage, placing the value into value_out and return the number of bytes that the entry in storage has beyond the offset or None if the storage entry doesn’t exist at all. If value_out length is smaller than the returned length, only value_out length bytes are copied into value_out.
  • Rollback the last transaction started by start_transaction.
  • “Commit” all existing operations and compute the resulting storage root.
  • Set key to value in the storage.
  • Start a new nested transaction.