referrerpolicy=no-referrer-when-downgrade

Struct substrate_rpc_client::WsClient

pub struct WsClient { /* private fields */ }
Expand description

Generic asynchronous client.

Implementations§

§

impl Client

pub fn builder() -> ClientBuilder

Create a builder for the server.

pub fn is_connected(&self) -> bool

Checks if the client is connected to the target.

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

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§

§

impl ClientT for Client

§

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 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 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,

§

impl Debug for Client

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Drop for Client

§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<Block: BlockT> HeaderProvider<Block> for WsClient
where Block::Header: DeserializeOwned,

source§

fn get_header<'life0, 'async_trait>( &'life0 self, hash: Block::Hash, ) -> Pin<Box<dyn Future<Output = Block::Header> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Awaits for the header of the block with hash hash.
§

impl SubscriptionClientT for Client

§

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.

§

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<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<TypeJsonRpseeInteral, Hash, BlockHash> AuthorApiClient<Hash, BlockHash> for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: SubscriptionClientT, Hash: Send + Sync + 'static + Serialize + DeserializeOwned, BlockHash: Send + Sync + 'static + DeserializeOwned,

§

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,

Submit hex-encoded extrinsic for inclusion in block.
§

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,

Insert a key into the keystore.
§

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,

Generate new session keys and returns the corresponding public keys.
§

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,

Checks if the keystore has private keys for the given session public keys. Read more
§

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,

Checks if the keystore has private keys for the given public key and key type. Read more
§

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,

Returns all pending extrinsics, potentially grouped by sender.
§

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,

Remove given extrinsic from the pool and temporarily ban it to prevent reimporting.
§

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,

Submit an extrinsic to watch. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<TypeJsonRpseeInteral, Number, Hash, Header, SignedBlock> ChainApiClient<Number, Hash, Header, SignedBlock> for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: SubscriptionClientT, Number: Send + Sync + 'static, Hash: Send + Sync + 'static + Serialize + DeserializeOwned, Header: Send + Sync + 'static + DeserializeOwned, SignedBlock: Send + Sync + 'static + DeserializeOwned,

§

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,

Get header.
§

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,

Get header and body of a block.
§

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,

Get hash of the n-th block in the canon chain. Read more
§

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,

Get hash of the last finalized block in the canon chain.
§

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,

All head subscription.
§

fn subscribe_new_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,

New head subscription.
§

fn subscribe_finalized_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,

Finalized head subscription.
§

impl<T> CheckedConversion for T

§

fn checked_from<T>(t: T) -> Option<Self>
where Self: TryFrom<T>,

Convert from a value of T into an equivalent instance of Option<Self>. Read more
§

fn checked_into<T>(self) -> Option<T>
where Self: TryInto<T>,

Consume self to return Some equivalent value of Option<T>. Read more
§

impl<TypeJsonRpseeInteral, Hash> ChildStateApiClient<Hash> for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT, Hash: Send + Sync + 'static + Serialize + DeserializeOwned,

§

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,

👎Deprecated since 2.0.0: Please use getKeysPaged with proper paging support
Returns the keys with prefix from a child storage, leave empty to get all the keys
§

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,

Returns the keys with prefix from a child storage with pagination support. Up to count keys will be returned. If start_key is passed, return next keys in storage in lexicographic order.
§

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,

Returns a child storage entry at a specific block’s state.
§

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,

Returns child storage entries for multiple keys at a specific block’s state.
§

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,

Returns the hash of a child storage entry at a block’s state.
§

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,

Returns the size of a child storage entry at a block’s state.
§

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,

Returns proof of storage for child key entries at a specific block’s state.
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<TypeJsonRpseeInteral, Hash> DevApiClient<Hash> for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT, Hash: Send + Sync + 'static + Serialize,

§

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,

Reexecute the specified block_hash and gather statistics while doing so. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
§

impl<Src, Dest> IntoTuple<Dest> for Src
where Dest: FromTuple<Src>,

§

fn into_tuple(self) -> Dest

§

impl<T, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

§

impl<TypeJsonRpseeInteral> MixnetApiClient for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT,

§

fn submit_extrinsic<'life0, 'async_trait>( &'life0 self, extrinsic: Bytes, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Submit encoded extrinsic over the mixnet for inclusion in block.
§

impl<TypeJsonRpseeInteral> OffchainApiClient for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT,

§

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.
§

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,

Get offchain local storage under given key and prefix.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> SaturatedConversion for T

§

fn saturated_from<T>(t: T) -> Self
where Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
§

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
§

impl<TypeJsonRpseeInteral, Hash> StateApiClient<Hash> for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: SubscriptionClientT, Hash: Send + Sync + 'static + Serialize + DeserializeOwned,

§

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,

Call a method from the runtime API at a block’s state.
§

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,

👎Deprecated since 2.0.0: Please use getKeysPaged with proper paging support
Returns the keys with prefix, leave empty to get all the keys.
§

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,

Returns the keys with prefix, leave empty to get all the keys
§

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,

Returns the keys with prefix with pagination support. Up to count keys will be returned. If start_key is passed, return next keys in storage in lexicographic order.
§

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,

Returns a storage entry at a specific block’s state.
§

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,

Returns the hash of a storage entry at a block’s state.
§

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,

Returns the size of a storage entry at a block’s state.
§

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,

Returns the runtime metadata as an opaque blob.
§

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,

Get the runtime version.
§

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,

Query historical storage entries (by key) starting from a block given as the second parameter. Read more
§

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,

Query storage entries (by key) at a block hash given as the second parameter. NOTE: Each StorageChangeSet in the result corresponds to exactly one element – the storage value under an input key at the input block hash.
§

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,

Returns proof of storage entries at a specific block’s state.
§

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,

The traceBlock RPC provides a way to trace the re-execution of a single block, collecting Spans and Events from both the client and the relevant WASM runtime. The Spans and Events are conceptually equivalent to those from the Tracing crate. Read more
§

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,

New runtime version subscription
§

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,

New storage subscription
§

impl<TypeJsonRpseeInteral> StatementApiClient for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT,

§

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,

Return all statements, SCALE-encoded.
§

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,

Return the data of all known statements which include all topics and have no DecryptionKey field.
§

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,

Return the data of all known statements whose decryption key is identified as 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).
§

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,

Return the decrypted data of all known statements whose decryption key is identified as dest. The key must be available to the client.
§

fn submit<'life0, 'async_trait>( &'life0 self, encoded: Bytes, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Submit a pre-encoded statement.
§

fn remove<'life0, 'async_trait>( &'life0 self, statement_hash: [u8; 32], ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Remove a statement from the store.
§

impl<TypeJsonRpseeInteral, Hash, Number> SystemApiClient<Hash, Number> for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT, Hash: Send + Sync + 'static + DeserializeOwned, Number: Send + Sync + 'static + DeserializeOwned,

§

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,

Get the node’s implementation name. Plain old string.
§

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,

Get the node implementation’s version. Should be a semver string.
§

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,

Get the chain’s name. Given as a string identifier.
§

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,

Get the chain’s type.
§

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,

Get a custom set of properties as a JSON object, defined in the chain spec.
§

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,

Return health status of the node. Read more
§

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,

Returns the base58-encoded PeerId of the node.
§

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,

Returns the multi-addresses that the local node is listening on Read more
§

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,

Returns currently connected peers
§

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,

Returns current state of the network. Read more
§

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,

Adds a reserved peer. Returns the empty string or an error. The string parameter should encode a p2p multiaddr. Read more
§

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,

Remove a reserved peer. Returns the empty string or an error. The string should encode only the PeerId e.g. QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV.
§

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,

Returns the list of reserved peers
§

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,

Returns the roles the node is running as.
§

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,

Returns the state of the syncing of the node: starting block, current best block, highest known block.
§

fn system_add_log_filter<'life0, 'async_trait>( &'life0 self, directives: String, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Adds the supplied directives to the current log filter Read more
§

fn system_reset_log_filter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Resets the log filter to Substrate defaults
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> JsonSchemaMaybe for T

§

impl<T> MaybeDebug for T
where T: Debug,

§

impl<T> MaybeSend for T
where T: Send,