LegacyHistoryNetworkApiClient

Trait LegacyHistoryNetworkApiClient 

Source
pub trait LegacyHistoryNetworkApiClient: ClientT {
Show 18 methods // Provided methods fn routing_table_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<RoutingTableInfo, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn radius<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<DataRadius, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn add_enr<'life0, 'async_trait>( &'life0 self, enr: Enr, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_enr<'life0, 'async_trait>( &'life0 self, node_id: NodeId, ) -> Pin<Box<dyn Future<Output = Result<Enr, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn delete_enr<'life0, 'async_trait>( &'life0 self, node_id: NodeId, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn lookup_enr<'life0, 'async_trait>( &'life0 self, node_id: NodeId, ) -> Pin<Box<dyn Future<Output = Result<Enr, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn ping<'life0, 'async_trait>( &'life0 self, enr: Enr, payload_type: Option<PingExtensionType>, payload: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<PongInfo, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn find_nodes<'life0, 'async_trait>( &'life0 self, enr: Enr, distances: Vec<u16>, ) -> Pin<Box<dyn Future<Output = Result<FindNodesInfo, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn recursive_find_nodes<'life0, 'async_trait>( &'life0 self, node_id: NodeId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Enr>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn find_content<'life0, 'async_trait>( &'life0 self, enr: Enr, content_key: LegacyHistoryContentKey, ) -> Pin<Box<dyn Future<Output = Result<FindContentInfo, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_content<'life0, 'async_trait>( &'life0 self, content_key: LegacyHistoryContentKey, ) -> Pin<Box<dyn Future<Output = Result<GetContentInfo, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn trace_get_content<'life0, 'async_trait>( &'life0 self, content_key: LegacyHistoryContentKey, ) -> Pin<Box<dyn Future<Output = Result<TraceContentInfo, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn paginate_local_content_keys<'life0, 'async_trait>( &'life0 self, offset: u64, limit: u64, ) -> Pin<Box<dyn Future<Output = Result<PaginateLocalContentInfo<LegacyHistoryContentKey>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn put_content<'life0, 'async_trait>( &'life0 self, content_key: LegacyHistoryContentKey, content_value: RawContentValue, ) -> Pin<Box<dyn Future<Output = Result<PutContentInfo, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn offer<'life0, 'async_trait>( &'life0 self, enr: Enr, content_items: Vec<(LegacyHistoryContentKey, RawContentValue)>, ) -> Pin<Box<dyn Future<Output = Result<AcceptInfo, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn trace_offer<'life0, 'async_trait>( &'life0 self, enr: Enr, content_key: LegacyHistoryContentKey, content_value: RawContentValue, ) -> Pin<Box<dyn Future<Output = Result<OfferTrace, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn store<'life0, 'async_trait>( &'life0 self, content_key: LegacyHistoryContentKey, content_value: RawContentValue, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn local_content<'life0, 'async_trait>( &'life0 self, content_key: LegacyHistoryContentKey, ) -> Pin<Box<dyn Future<Output = Result<RawContentValue, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... }
}
Expand description

Client implementation for the LegacyHistoryNetworkApi RPC API.

Provided Methods§

Source

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

Returns meta information about overlay routing table.

Source

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

Returns the node data radios

Source

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

Write an Ethereum Node Record to the overlay routing table.

Source

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

Fetch the latest ENR associated with the given node ID.

Source

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

Delete Node ID from the overlay routing table.

Source

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

Fetch the ENR representation associated with the given Node ID.

Source

fn ping<'life0, 'async_trait>( &'life0 self, enr: Enr, payload_type: Option<PingExtensionType>, payload: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<PongInfo, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send a PING message to the designated node and wait for a PONG response

Source

fn find_nodes<'life0, 'async_trait>( &'life0 self, enr: Enr, distances: Vec<u16>, ) -> Pin<Box<dyn Future<Output = Result<FindNodesInfo, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send a FINDNODES request for nodes that fall within the given set of distances, to the designated peer and wait for a response

Source

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

Lookup a target node within in the network

Source

fn find_content<'life0, 'async_trait>( &'life0 self, enr: Enr, content_key: LegacyHistoryContentKey, ) -> Pin<Box<dyn Future<Output = Result<FindContentInfo, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send FINDCONTENT message to get the content with a content key.

Source

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

First checks local storage if content is not found lookup a target content key in the network

Source

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

First checks local storage if content is not found lookup a target content key in the network. Return tracing info.

Source

fn paginate_local_content_keys<'life0, 'async_trait>( &'life0 self, offset: u64, limit: u64, ) -> Pin<Box<dyn Future<Output = Result<PaginateLocalContentInfo<LegacyHistoryContentKey>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Pagination of local content keys

Source

fn put_content<'life0, 'async_trait>( &'life0 self, content_key: LegacyHistoryContentKey, content_value: RawContentValue, ) -> Pin<Box<dyn Future<Output = Result<PutContentInfo, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send the provided content value to interested peers. Clients may choose to send to some or all peers. Return the number of peers that the content was gossiped to.

Source

fn offer<'life0, 'async_trait>( &'life0 self, enr: Enr, content_items: Vec<(LegacyHistoryContentKey, RawContentValue)>, ) -> Pin<Box<dyn Future<Output = Result<AcceptInfo, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send an OFFER request with given ContentItems, to the designated peer and wait for a response. Does not store the content locally. Returns the content keys bitlist upon successful content transmission or empty bitlist receive.

Source

fn trace_offer<'life0, 'async_trait>( &'life0 self, enr: Enr, content_key: LegacyHistoryContentKey, content_value: RawContentValue, ) -> Pin<Box<dyn Future<Output = Result<OfferTrace, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send an OFFER request with given ContentItems, to the designated peer. Does not store the content locally. Returns trace info for the offer.

Source

fn store<'life0, 'async_trait>( &'life0 self, content_key: LegacyHistoryContentKey, content_value: RawContentValue, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Store content key with a content data to the local database.

Source

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

Get a content value from the local database

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.

Implementors§

Source§

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