Trait OffchainApi
pub trait OffchainApi: ClientT {
// Provided methods
fn set_local_storage<'life0, 'async_trait>(
&'life0 self,
kind: StorageKind,
key: Bytes,
value: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn clear_local_storage<'life0, 'async_trait>(
&'life0 self,
kind: StorageKind,
key: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn get_local_storage<'life0, 'async_trait>(
&'life0 self,
kind: StorageKind,
key: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
}
Expand description
Client implementation for the OffchainApi
RPC API.
Provided Methods§
fn set_local_storage<'life0, 'async_trait>(
&'life0 self,
kind: StorageKind,
key: Bytes,
value: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn set_local_storage<'life0, 'async_trait>(
&'life0 self,
kind: StorageKind,
key: Bytes,
value: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Set offchain local storage under given key and prefix.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.