pub trait RpcClient: SubscriptionClientT {
Show 25 methods
// Provided methods
fn parameters<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<VersionedParameters, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn best_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockDesc, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockDesc, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn parent<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<BlockDesc, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn state_root<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<StateRootHash, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn statistics<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn service_data<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn service_value<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn service_preimage<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn service_request<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
hash: Hash,
len: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Slot>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn beefy_root<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<MmrPeakHash, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn submit_work_package<'life0, 'async_trait>(
&'life0 self,
core: CoreIndex,
package: Vec<u8>,
extrinsics: Vec<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn submit_preimage<'life0, 'async_trait>(
&'life0 self,
requester: ServiceId,
preimage: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn list_services<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceId>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn fetch_work_package_segments<'life0, 'async_trait>(
&'life0 self,
wp_hash: WorkPackageHash,
indices: Vec<u16>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Segment>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn fetch_segments<'life0, 'async_trait>(
&'life0 self,
segment_root: SegmentTreeRoot,
indices: Vec<u16>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Segment>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn sync_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncState, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn subscribe_best_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<BlockDesc>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn subscribe_finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<BlockDesc>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn subscribe_statistics<'life0, 'async_trait>(
&'life0 self,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Vec<u8>>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn subscribe_service_data<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<u8>>>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn subscribe_service_value<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
key: Vec<u8>,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<u8>>>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn subscribe_service_preimage<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
hash: Hash,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<u8>>>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn subscribe_service_request<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
hash: Hash,
len: u32,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<Slot>>>>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn subscribe_sync_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<SyncStatus>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Client implementation for the Rpc
RPC API.
Provided Methods§
Sourcefn parameters<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<VersionedParameters, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn parameters<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<VersionedParameters, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Parameters of the chain, version 1.
Sourcefn best_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockDesc, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn best_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockDesc, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the header hash and slot of the head of the “best” chain.
Sourcefn finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockDesc, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockDesc, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the header hash and slot of the latest finalized block.
Sourcefn parent<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<BlockDesc, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn parent<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<BlockDesc, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the header hash and slot of the parent of the block with the given header hash.
Sourcefn state_root<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<StateRootHash, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn state_root<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<StateRootHash, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the posterior state root of the block with the given header hash.
Sourcefn statistics<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn statistics<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the activity statistics stored in the posterior state of the block with the given header hash.
The statistics are encoded as per the GP.
Sourcefn service_data<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn service_data<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the storage data for the service of the given service ID.
The data are encoded as per the GP. None
is returned if there is no value associated with
the given service ID.
Sourcefn service_value<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn service_value<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the value associated with the given service ID and key in the posterior state of the block with the given header hash.
None
is returned if there is no value associated with the given service ID and key.
Sourcefn service_preimage<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn service_preimage<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the preimage associated with the given service ID and hash in the posterior state of the block with the given header hash.
None
is returned if there is no preimage associated with the given service ID and
hash.
Sourcefn service_request<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
hash: Hash,
len: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Slot>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn service_request<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
id: ServiceId,
hash: Hash,
len: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Slot>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the preimage request associated with the given service ID and hash/len in the posterior state of the block with the given header hash.
None
is returned if there is no preimage request associated with the given service ID,
hash and length.
Sourcefn beefy_root<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<MmrPeakHash, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn beefy_root<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<MmrPeakHash, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the BEEFY root of the block with the given header hash.
Sourcefn submit_work_package<'life0, 'async_trait>(
&'life0 self,
core: CoreIndex,
package: Vec<u8>,
extrinsics: Vec<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn submit_work_package<'life0, 'async_trait>(
&'life0 self,
core: CoreIndex,
package: Vec<u8>,
extrinsics: Vec<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Submit a work-package to the guarantors currently assigned to the given core.
Sourcefn submit_preimage<'life0, 'async_trait>(
&'life0 self,
requester: ServiceId,
preimage: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn submit_preimage<'life0, 'async_trait>(
&'life0 self,
requester: ServiceId,
preimage: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Submit a preimage which is being requested by a given service.
Note that this method does not wait for the preimage to be distributed or integrated on-chain; it returns immediately.
Sourcefn list_services<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceId>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn list_services<'life0, 'async_trait>(
&'life0 self,
header_hash: HeaderHash,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceId>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns a list of all services currently known to be on JAM. This is a best-effort list and may not reflect the true state. Nodes could e.g. reasonably hide services which are not recently active from this list.
Sourcefn fetch_work_package_segments<'life0, 'async_trait>(
&'life0 self,
wp_hash: WorkPackageHash,
indices: Vec<u16>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Segment>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn fetch_work_package_segments<'life0, 'async_trait>(
&'life0 self,
wp_hash: WorkPackageHash,
indices: Vec<u16>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Segment>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Fetches a list of exported segments from the DA layer for the given work package hash.
Sourcefn fetch_segments<'life0, 'async_trait>(
&'life0 self,
segment_root: SegmentTreeRoot,
indices: Vec<u16>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Segment>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn fetch_segments<'life0, 'async_trait>(
&'life0 self,
segment_root: SegmentTreeRoot,
indices: Vec<u16>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Segment>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Fetches a list of exported segments from the DA layer for the given segment root hash.
Sourcefn sync_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncState, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn sync_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncState, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns the sync status of the node.
Sourcefn subscribe_best_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<BlockDesc>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_best_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<BlockDesc>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Subscribe to updates of the head of the “best” chain, as returned by bestBlock
.
Sourcefn subscribe_finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<BlockDesc>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<BlockDesc>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Subscribe to updates of the latest finalized block, as returned by finalizedBlock
.
Sourcefn subscribe_statistics<'life0, 'async_trait>(
&'life0 self,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Vec<u8>>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_statistics<'life0, 'async_trait>(
&'life0 self,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Vec<u8>>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Subscribe to updates of the activity statistics stored in chain state.
If finalized
is true, the subscription will track the latest finalized block. If
finalized
is false, the subscription will track the head of the “best” chain. Note that
in the latter case the reported statistics may never be included in the finalized chain.
The statistics are encoded as per the GP.
Sourcefn subscribe_service_data<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<u8>>>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_service_data<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<u8>>>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Subscribe to updates of the storage data for the service of the given service ID.
If finalized
is true, the subscription will track the latest finalized block. If
finalized
is false, the subscription will track the head of the “best” chain. Note that
in the latter case the reported service data may never be included in the finalized chain.
The value
field of subscription messages will contain service data encoded as per the GP.
It will be None
when there is no data associated with the given ID.
Sourcefn subscribe_service_value<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
key: Vec<u8>,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<u8>>>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_service_value<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
key: Vec<u8>,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<u8>>>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Subscribe to updates of the value associated with the given service ID and key.
If finalized
is true, the subscription will track the latest finalized block. If
finalized
is false, the subscription will track the head of the “best” chain. Note that
in the latter case reported value changes may never be included in the finalized chain.
The value
field of subscription messages will be None
when there is no value associated
with the given service ID and key.
Sourcefn subscribe_service_preimage<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
hash: Hash,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<u8>>>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_service_preimage<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
hash: Hash,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<u8>>>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Subscribe to updates of the preimage associated with the given service ID and hash.
If finalized
is true, the subscription will track the latest finalized block. If
finalized
is false, the subscription will track the head of the “best” chain. Note that
in the latter case reported preimage changes may never be included in the finalized chain.
The value
field of subscription messages will be None
when there is no preimage
associated with the given service ID and hash.
Sourcefn subscribe_service_request<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
hash: Hash,
len: u32,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<Slot>>>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_service_request<'life0, 'async_trait>(
&'life0 self,
id: ServiceId,
hash: Hash,
len: u32,
finalized: bool,
) -> Pin<Box<dyn Future<Output = Result<Subscription<StateUpdate<Option<Vec<Slot>>>>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Subscribe to updates of the preimage request associated with the given service ID and hash/len.
If finalized
is true, the subscription will track the latest finalized block. If
finalized
is false, the subscription will track the head of the “best” chain. Note that
in the latter case reported preimage request changes may never be included in the finalized
chain.
The value
field of subscription messages will be None
when there is no preimage request
associated with the given service ID, hash and length.
Sourcefn subscribe_sync_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<SyncStatus>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_sync_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<SyncStatus>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Subscribe to changes in sync status.
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.