[][src]Module sp_io::storage

Interface for accessing the storage from within the runtime.

Structs

HostFunctions

Provides implementations for the extern host functions.

Functions

changes_root

"Commit" all existing operations and get the resulting storage change root. parent_hash is a SCALE encoded hash.

child_clear

Clear the given child storage of the given key and its value.

child_clear_prefix

Clear the child storage of each key-value pair where the key starts with the given prefix.

child_exists

Check whether the given key exists in storage.

child_get

All Child api uses :

child_next_key

Get the next key in storage after the given one in lexicographic order in child storage.

child_read

Get key from child 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.

child_root

"Commit" all existing operations and compute the resulting child storage root.

child_set

Set key to value in the child storage denoted by child_storage_key.

child_storage_kill

Clear an entire child storage.

clear

Clear the storage of the given key and its value.

clear_prefix

Clear the storage of each key-value pair where the key starts with the given prefix.

exists

Check whether the given key exists in storage.

get

Returns the data for key in the storage or None if the key can not be found.

next_key

Get the next key in storage after the given one in lexicographic order.

read

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.

root

"Commit" all existing operations and compute the resulting storage root.

set

Set key to value in the storage.