pub struct WsClient { /* private fields */ }
Expand description
Generic asynchronous client.
Implementations§
Source§impl Client
impl Client
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Create a builder for the server.
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Checks if the client is connected to the target.
Sourcepub async fn disconnect_reason(&self) -> Error
pub async fn disconnect_reason(&self) -> Error
This is similar to Client::on_disconnect
but it can be used to get
the reason why the client was disconnected but it’s not cancel-safe.
The typical use-case is that this method will be called after
Client::on_disconnect
has returned in a “select loop”.
§Cancel-safety
This method is cancel-safe
Sourcepub async fn on_disconnect(&self)
pub async fn on_disconnect(&self)
Completes when the client is disconnected or the client’s background task encountered an error. If the client is already disconnected, the future produced by this method will complete immediately.
§Cancel safety
This method is cancel safe.
Trait Implementations§
Source§impl ClientT for Client
impl ClientT for Client
Source§fn notification<'life0, 'life1, 'async_trait, Params>(
&'life0 self,
method: &'life1 str,
params: Params,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Params: ToRpcParams + Send + 'async_trait,
Client: 'async_trait,
fn notification<'life0, 'life1, 'async_trait, Params>(
&'life0 self,
method: &'life1 str,
params: Params,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Params: ToRpcParams + Send + 'async_trait,
Client: 'async_trait,
Source§fn request<'life0, 'life1, 'async_trait, R, Params>(
&'life0 self,
method: &'life1 str,
params: Params,
) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
R: DeserializeOwned + 'async_trait,
Params: ToRpcParams + Send + 'async_trait,
Client: 'async_trait,
fn request<'life0, 'life1, 'async_trait, R, Params>(
&'life0 self,
method: &'life1 str,
params: Params,
) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
R: DeserializeOwned + 'async_trait,
Params: ToRpcParams + Send + 'async_trait,
Client: 'async_trait,
Source§fn batch_request<'a, 'life0, 'async_trait, R>(
&'life0 self,
batch: BatchRequestBuilder<'a>,
) -> Pin<Box<dyn Future<Output = Result<BatchResponse<'a, R>, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
R: DeserializeOwned + 'async_trait,
Client: 'async_trait,
fn batch_request<'a, 'life0, 'async_trait, R>(
&'life0 self,
batch: BatchRequestBuilder<'a>,
) -> Pin<Box<dyn Future<Output = Result<BatchResponse<'a, R>, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
R: DeserializeOwned + 'async_trait,
Client: 'async_trait,
Source§impl<Block: BlockT> HeaderProvider<Block> for WsClientwhere
Block::Header: DeserializeOwned,
impl<Block: BlockT> HeaderProvider<Block> for WsClientwhere
Block::Header: DeserializeOwned,
Source§impl SubscriptionClientT for Client
impl SubscriptionClientT for Client
Source§fn subscribe<'a, 'life0, 'async_trait, Notif, Params>(
&'life0 self,
subscribe_method: &'a str,
params: Params,
unsubscribe_method: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Subscription<Notif>, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Params: ToRpcParams + Send + 'async_trait,
Notif: DeserializeOwned + 'async_trait,
Client: 'async_trait,
fn subscribe<'a, 'life0, 'async_trait, Notif, Params>(
&'life0 self,
subscribe_method: &'a str,
params: Params,
unsubscribe_method: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Subscription<Notif>, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Params: ToRpcParams + Send + 'async_trait,
Notif: DeserializeOwned + 'async_trait,
Client: 'async_trait,
Send a subscription request to the server.
The subscribe_method
and params
are used to ask for the subscription towards the
server. The unsubscribe_method
is used to close the subscription.
Source§fn subscribe_to_method<'a, 'life0, 'async_trait, N>(
&'life0 self,
method: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Subscription<N>, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
N: DeserializeOwned + 'async_trait,
Client: 'async_trait,
fn subscribe_to_method<'a, 'life0, 'async_trait, N>(
&'life0 self,
method: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Subscription<N>, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
N: DeserializeOwned + 'async_trait,
Client: 'async_trait,
Subscribe to a specific method.
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<TypeJsonRpseeInteral, Hash, BlockHash> AuthorApiClient<Hash, BlockHash> for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: SubscriptionClientT,
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
BlockHash: Send + Sync + 'static + DeserializeOwned,
impl<TypeJsonRpseeInteral, Hash, BlockHash> AuthorApiClient<Hash, BlockHash> for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: SubscriptionClientT,
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
BlockHash: Send + Sync + 'static + DeserializeOwned,
Source§fn submit_extrinsic<'life0, 'async_trait>(
&'life0 self,
extrinsic: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn submit_extrinsic<'life0, 'async_trait>(
&'life0 self,
extrinsic: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn insert_key<'life0, 'async_trait>(
&'life0 self,
key_type: String,
suri: String,
public: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn insert_key<'life0, 'async_trait>(
&'life0 self,
key_type: String,
suri: String,
public: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn rotate_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn rotate_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn has_session_keys<'life0, 'async_trait>(
&'life0 self,
session_keys: Bytes,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn has_session_keys<'life0, 'async_trait>(
&'life0 self,
session_keys: Bytes,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn has_key<'life0, 'async_trait>(
&'life0 self,
public_key: Bytes,
key_type: String,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn has_key<'life0, 'async_trait>(
&'life0 self,
public_key: Bytes,
key_type: String,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn pending_extrinsics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn pending_extrinsics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn remove_extrinsic<'life0, 'async_trait>(
&'life0 self,
bytes_or_hash: Vec<ExtrinsicOrHash<Hash>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn remove_extrinsic<'life0, 'async_trait>(
&'life0 self,
bytes_or_hash: Vec<ExtrinsicOrHash<Hash>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn watch_extrinsic<'life0, 'async_trait>(
&'life0 self,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Subscription<TransactionStatus<Hash, BlockHash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn watch_extrinsic<'life0, 'async_trait>(
&'life0 self,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Subscription<TransactionStatus<Hash, BlockHash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<TypeJsonRpseeInteral, Number, Hash, Header, SignedBlock> ChainApiClient<Number, Hash, Header, SignedBlock> for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: SubscriptionClientT,
Number: Send + Sync + 'static,
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
Header: Send + Sync + 'static + DeserializeOwned,
SignedBlock: Send + Sync + 'static + DeserializeOwned,
impl<TypeJsonRpseeInteral, Number, Hash, Header, SignedBlock> ChainApiClient<Number, Hash, Header, SignedBlock> for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: SubscriptionClientT,
Number: Send + Sync + 'static,
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
Header: Send + Sync + 'static + DeserializeOwned,
SignedBlock: Send + Sync + 'static + DeserializeOwned,
Source§fn header<'life0, 'async_trait>(
&'life0 self,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<Header>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn header<'life0, 'async_trait>(
&'life0 self,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<Header>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn block<'life0, 'async_trait>(
&'life0 self,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<SignedBlock>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn block<'life0, 'async_trait>(
&'life0 self,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<SignedBlock>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn block_hash<'life0, 'async_trait>(
&'life0 self,
hash: Option<ListOrValue<NumberOrHex>>,
) -> Pin<Box<dyn Future<Output = Result<ListOrValue<Option<Hash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn block_hash<'life0, 'async_trait>(
&'life0 self,
hash: Option<ListOrValue<NumberOrHex>>,
) -> Pin<Box<dyn Future<Output = Result<ListOrValue<Option<Hash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn finalized_head<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn finalized_head<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn subscribe_all_heads<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<Header>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn subscribe_all_heads<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<Header>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<TypeJsonRpseeInteral, Hash> ChildStateApiClient<Hash> for TypeJsonRpseeInteral
impl<TypeJsonRpseeInteral, Hash> ChildStateApiClient<Hash> for TypeJsonRpseeInteral
Source§fn storage_keys<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
prefix: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_keys<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
prefix: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
getKeysPaged
with proper paging supportSource§fn storage_keys_paged<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_keys_paged<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
count
keys will be returned.
If start_key
is passed, return next keys in storage in lexicographic order.Source§fn storage<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<StorageData>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<StorageData>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn storage_entries<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<StorageData>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_entries<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<StorageData>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn storage_hash<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_hash<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn storage_size<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_size<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn read_child_proof<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<ReadProof<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn read_child_proof<'life0, 'async_trait>(
&'life0 self,
child_storage_key: PrefixedStorageKey,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<ReadProof<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§impl<TypeJsonRpseeInteral, Hash> DevApiClient<Hash> for TypeJsonRpseeInteral
impl<TypeJsonRpseeInteral, Hash> DevApiClient<Hash> for TypeJsonRpseeInteral
Source§fn block_stats<'life0, 'async_trait>(
&'life0 self,
block_hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockStats>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn block_stats<'life0, 'async_trait>(
&'life0 self,
block_hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockStats>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
block_hash
and gather statistics while doing so. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<TypeJsonRpseeInteral> MixnetApiClient for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: ClientT,
impl<TypeJsonRpseeInteral> MixnetApiClient for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: ClientT,
Source§impl<TypeJsonRpseeInteral> OffchainApiClient for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: ClientT,
impl<TypeJsonRpseeInteral> OffchainApiClient for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: ClientT,
Source§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,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read moreSource§impl<TypeJsonRpseeInteral, Hash> StateApiClient<Hash> for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: SubscriptionClientT,
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
impl<TypeJsonRpseeInteral, Hash> StateApiClient<Hash> for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: SubscriptionClientT,
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
Source§fn call<'life0, 'async_trait>(
&'life0 self,
name: String,
bytes: Bytes,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
name: String,
bytes: Bytes,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn storage_keys<'life0, 'async_trait>(
&'life0 self,
prefix: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_keys<'life0, 'async_trait>(
&'life0 self,
prefix: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
getKeysPaged
with proper paging supportSource§fn storage_pairs<'life0, 'async_trait>(
&'life0 self,
prefix: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<(StorageKey, StorageData)>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_pairs<'life0, 'async_trait>(
&'life0 self,
prefix: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<(StorageKey, StorageData)>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn storage_keys_paged<'life0, 'async_trait>(
&'life0 self,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_keys_paged<'life0, 'async_trait>(
&'life0 self,
prefix: Option<StorageKey>,
count: u32,
start_key: Option<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageKey>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
count
keys will be returned.
If start_key
is passed, return next keys in storage in lexicographic order.Source§fn storage<'life0, 'async_trait>(
&'life0 self,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<StorageData>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage<'life0, 'async_trait>(
&'life0 self,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<StorageData>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn storage_hash<'life0, 'async_trait>(
&'life0 self,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_hash<'life0, 'async_trait>(
&'life0 self,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn storage_size<'life0, 'async_trait>(
&'life0 self,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn storage_size<'life0, 'async_trait>(
&'life0 self,
key: StorageKey,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn metadata<'life0, 'async_trait>(
&'life0 self,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn metadata<'life0, 'async_trait>(
&'life0 self,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn runtime_version<'life0, 'async_trait>(
&'life0 self,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<RuntimeVersion, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn runtime_version<'life0, 'async_trait>(
&'life0 self,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<RuntimeVersion, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn query_storage<'life0, 'async_trait>(
&'life0 self,
keys: Vec<StorageKey>,
block: Hash,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageChangeSet<Hash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn query_storage<'life0, 'async_trait>(
&'life0 self,
keys: Vec<StorageKey>,
block: Hash,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageChangeSet<Hash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn query_storage_at<'life0, 'async_trait>(
&'life0 self,
keys: Vec<StorageKey>,
at: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageChangeSet<Hash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn query_storage_at<'life0, 'async_trait>(
&'life0 self,
keys: Vec<StorageKey>,
at: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StorageChangeSet<Hash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn read_proof<'life0, 'async_trait>(
&'life0 self,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<ReadProof<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn read_proof<'life0, 'async_trait>(
&'life0 self,
keys: Vec<StorageKey>,
hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<ReadProof<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn trace_block<'life0, 'async_trait>(
&'life0 self,
block: Hash,
targets: Option<String>,
storage_keys: Option<String>,
methods: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<TraceBlockResponse, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn trace_block<'life0, 'async_trait>(
&'life0 self,
block: Hash,
targets: Option<String>,
storage_keys: Option<String>,
methods: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<TraceBlockResponse, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn subscribe_runtime_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<RuntimeVersion>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn subscribe_runtime_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<RuntimeVersion>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn subscribe_storage<'life0, 'async_trait>(
&'life0 self,
keys: Option<Vec<StorageKey>>,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StorageChangeSet<Hash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn subscribe_storage<'life0, 'async_trait>(
&'life0 self,
keys: Option<Vec<StorageKey>>,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StorageChangeSet<Hash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§impl<TypeJsonRpseeInteral> StatementApiClient for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: ClientT,
impl<TypeJsonRpseeInteral> StatementApiClient for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: ClientT,
Source§fn dump<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn dump<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn broadcasts<'life0, 'async_trait>(
&'life0 self,
match_all_topics: Vec<[u8; 32]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn broadcasts<'life0, 'async_trait>(
&'life0 self,
match_all_topics: Vec<[u8; 32]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
DecryptionKey
field.Source§fn posted<'life0, 'async_trait>(
&'life0 self,
match_all_topics: Vec<[u8; 32]>,
dest: [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn posted<'life0, 'async_trait>(
&'life0 self,
match_all_topics: Vec<[u8; 32]>,
dest: [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
dest
(this
will generally be the public key or a hash thereof for symmetric ciphers, or a hash of the
private key for symmetric ciphers).Source§fn posted_clear<'life0, 'async_trait>(
&'life0 self,
match_all_topics: Vec<[u8; 32]>,
dest: [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn posted_clear<'life0, 'async_trait>(
&'life0 self,
match_all_topics: Vec<[u8; 32]>,
dest: [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
dest
. The key must be available to the client.Source§impl<TypeJsonRpseeInteral, Hash, Number> SystemApiClient<Hash, Number> for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: ClientT,
Hash: Send + Sync + 'static + DeserializeOwned,
Number: Send + Sync + 'static + DeserializeOwned,
impl<TypeJsonRpseeInteral, Hash, Number> SystemApiClient<Hash, Number> for TypeJsonRpseeInteralwhere
TypeJsonRpseeInteral: ClientT,
Hash: Send + Sync + 'static + DeserializeOwned,
Number: Send + Sync + 'static + DeserializeOwned,
Source§fn system_name<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_name<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_chain<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_chain<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_type<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChainType, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_type<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChainType, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_properties<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Map<String, Value>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_properties<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Map<String, Value>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Health, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Health, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_local_peer_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_local_peer_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_local_listen_addresses<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_local_listen_addresses<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo<Hash, Number>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo<Hash, Number>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_network_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_network_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_add_reserved_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_add_reserved_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
p2p
multiaddr. Read moreSource§fn system_remove_reserved_peer<'life0, 'async_trait>(
&'life0 self,
peer_id: String,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_remove_reserved_peer<'life0, 'async_trait>(
&'life0 self,
peer_id: String,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV
.Source§fn system_reserved_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_reserved_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_node_roles<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeRole>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_node_roles<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeRole>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§fn system_sync_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncState<Number>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn system_sync_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncState<Number>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.