referrerpolicy=no-referrer-when-downgrade
sp_io::storage

Function read

Source
pub fn read(
    key: <PassFatPointerAndRead<&[u8]> as RIType>::Inner,
    value_out: <PassFatPointerAndReadWrite<&mut [u8]> as RIType>::Inner,
    value_offset: <u32 as RIType>::Inner,
) -> <AllocateAndReturnByCodec<Option<u32>> as RIType>::Inner
Expand description

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.