Trait sc_rpc::offchain::OffchainApi [−][src]
Substrate offchain RPC API
Required methods
pub fn set_local_storage(
&self,
kind: StorageKind,
key: Bytes,
value: Bytes
) -> Result<(), Error>
[src]
&self,
kind: StorageKind,
key: Bytes,
value: Bytes
) -> Result<(), Error>
Set offchain local storage under given key and prefix.
pub fn get_local_storage(
&self,
kind: StorageKind,
key: Bytes
) -> Result<Option<Bytes>, Error>
[src]
&self,
kind: StorageKind,
key: Bytes
) -> Result<Option<Bytes>, Error>
Get offchain local storage under given key and prefix.
Provided methods
pub fn to_delegate<M>(self) -> IoDelegate<Self, M> where
M: Metadata,
[src]
M: Metadata,
Create an IoDelegate
, wiring rpc calls to the trait methods.
Implementors
impl<T: OffchainStorage + 'static> OffchainApi for Offchain<T>
[src]
fn set_local_storage(
&self,
kind: StorageKind,
key: Bytes,
value: Bytes
) -> Result<()>
[src]
&self,
kind: StorageKind,
key: Bytes,
value: Bytes
) -> Result<()>
Set offchain local storage under given key and prefix.
fn get_local_storage(
&self,
kind: StorageKind,
key: Bytes
) -> Result<Option<Bytes>>
[src]
&self,
kind: StorageKind,
key: Bytes
) -> Result<Option<Bytes>>
Get offchain local storage under given key and prefix.