pub struct GrpcClient { /* private fields */ }Implementations§
Source§impl GrpcClient
impl GrpcClient
pub const DIRECT_MODE_LISTENER_ID: ListenerId = 0u64
pub async fn connect(url: String) -> Result<GrpcClient>
Sourcepub async fn connect_with_args(
notification_mode: NotificationMode,
url: String,
subscription_context: Option<SubscriptionContext>,
reconnect: bool,
connection_event_sender: Option<Sender<ConnectionEvent>>,
override_handle_stop_notify: bool,
timeout_duration: Option<u64>,
counters: Arc<TowerConnectionCounters>,
) -> Result<GrpcClient>
pub async fn connect_with_args( notification_mode: NotificationMode, url: String, subscription_context: Option<SubscriptionContext>, reconnect: bool, connection_event_sender: Option<Sender<ConnectionEvent>>, override_handle_stop_notify: bool, timeout_duration: Option<u64>, counters: Arc<TowerConnectionCounters>, ) -> Result<GrpcClient>
Connects to a gRPC server.
notification_mode determines how notifications are handled:
MultiListeners=> Multiple listeners are supported via theRpcApiimplementation. Registering listeners is needed before subscribing to notifications.Direct=> A single listener receives the notification via a channel (seeself.notification_channel_receiver()). Registering a listener is pointless and ignored. Subscribing to notifications ignores the listener ID.
url: the server to connect to
subscription_context: it is advised to provide a clone of the same instance if multiple clients dealing with
UtxosChangedNotifications are connected concurrently in order to optimize the memory footprint.
reconnect: features an automatic reconnection to the server, reactivating all subscriptions on success.
connection_event_sender: when provided will notify of connection and disconnection events via the channel.
override_handle_stop_notify: legacy, should be removed in near future, always set to false.
timeout_duration: request timeout duration
counters: collects some bandwidth metrics
pub fn notifier(&self) -> Option<Arc<GrpcClientNotifier>>
Sourcepub async fn start(&self, notify: Option<GrpcClientNotify>)
pub async fn start(&self, notify: Option<GrpcClientNotify>)
Starts RPC services.
pub fn is_connected(&self) -> bool
pub fn handle_message_id(&self) -> bool
pub fn handle_stop_notify(&self) -> bool
pub async fn disconnect(&self) -> Result<()>
pub fn notification_channel_receiver(&self) -> Receiver<Notification>
pub fn notification_mode(&self) -> NotificationMode
Trait Implementations§
Source§impl Clone for GrpcClient
impl Clone for GrpcClient
Source§fn clone(&self) -> GrpcClient
fn clone(&self) -> GrpcClient
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GrpcClient
impl Debug for GrpcClient
Source§impl RpcApi for GrpcClient
impl RpcApi for GrpcClient
Source§fn register_new_listener(&self, connection: ChannelConnection) -> ListenerId
fn register_new_listener(&self, connection: ChannelConnection) -> ListenerId
Register a new listener and returns an id identifying it.
Source§fn unregister_listener<'life0, 'async_trait>(
&'life0 self,
id: ListenerId,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unregister_listener<'life0, 'async_trait>(
&'life0 self,
id: ListenerId,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unregister an existing listener.
Stop all notifications for this listener, unregister the id and its associated connection.
Source§fn start_notify<'life0, 'async_trait>(
&'life0 self,
id: ListenerId,
scope: Scope,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_notify<'life0, 'async_trait>(
&'life0 self,
id: ListenerId,
scope: Scope,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start sending notifications of some type to a listener.
Source§fn stop_notify<'life0, 'async_trait>(
&'life0 self,
id: ListenerId,
scope: Scope,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop_notify<'life0, 'async_trait>(
&'life0 self,
id: ListenerId,
scope: Scope,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop sending notifications of some type to a listener.
fn ping_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: PingRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<PingResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_sync_status_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetSyncStatusRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetSyncStatusResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_server_info_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetServerInfoRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetServerInfoResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_metrics_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetMetricsRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetMetricsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_connections_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetConnectionsRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetConnectionsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_system_info_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetSystemInfoRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetSystemInfoResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn submit_block_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: SubmitBlockRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<SubmitBlockResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_block_template_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetBlockTemplateRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetBlockTemplateResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_block_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetBlockRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetBlockResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_info_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetInfoRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetInfoResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_current_network_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetCurrentNetworkRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetCurrentNetworkResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_peer_addresses_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetPeerAddressesRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetPeerAddressesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_sink_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetSinkRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetSinkResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mempool_entry_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetMempoolEntryRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetMempoolEntryResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mempool_entries_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetMempoolEntriesRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetMempoolEntriesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_connected_peer_info_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetConnectedPeerInfoRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetConnectedPeerInfoResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_peer_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: AddPeerRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<AddPeerResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn submit_transaction_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: SubmitTransactionRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<SubmitTransactionResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn submit_transaction_replacement_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: SubmitTransactionReplacementRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<SubmitTransactionReplacementResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_subnetwork_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetSubnetworkRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetSubnetworkResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_virtual_chain_from_block_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetVirtualChainFromBlockRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetVirtualChainFromBlockResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_blocks_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetBlocksRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetBlocksResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_block_count_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetBlockCountRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetBlockCountResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_block_dag_info_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetBlockDagInfoRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetBlockDagInfoResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_finality_conflict_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: ResolveFinalityConflictRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<ResolveFinalityConflictResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn shutdown_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: ShutdownRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<ShutdownResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_headers_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetHeadersRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetHeadersResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_utxos_by_addresses_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetUtxosByAddressesRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetUtxosByAddressesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_balance_by_address_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetBalanceByAddressRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetBalanceByAddressResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_balances_by_addresses_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetBalancesByAddressesRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetBalancesByAddressesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_sink_blue_score_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetSinkBlueScoreRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetSinkBlueScoreResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ban_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: BanRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<BanResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unban_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: UnbanRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<UnbanResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn estimate_network_hashes_per_second_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: EstimateNetworkHashesPerSecondRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<EstimateNetworkHashesPerSecondResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mempool_entries_by_addresses_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetMempoolEntriesByAddressesRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetMempoolEntriesByAddressesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_coin_supply_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetCoinSupplyRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetCoinSupplyResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_daa_score_timestamp_estimate_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetDaaScoreTimestampEstimateRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetDaaScoreTimestampEstimateResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_fee_estimate_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetFeeEstimateRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetFeeEstimateResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_fee_estimate_experimental_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetFeeEstimateExperimentalRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetFeeEstimateExperimentalResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_current_block_color_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: Option<&'life1 Arc<dyn RpcConnection>>,
request: GetCurrentBlockColorRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<GetCurrentBlockColorResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_system_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetSystemInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_connections<'life0, 'async_trait>(
&'life0 self,
include_profile_data: bool,
) -> Pin<Box<dyn Future<Output = Result<GetConnectionsResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_metrics<'life0, 'async_trait>(
&'life0 self,
process_metrics: bool,
connection_metrics: bool,
bandwidth_metrics: bool,
consensus_metrics: bool,
storage_metrics: bool,
custom_metrics: bool,
) -> Pin<Box<dyn Future<Output = Result<GetMetricsResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_server_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetServerInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_sync_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_current_network<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkType, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_current_network<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkType, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn submit_block<'life0, 'async_trait>(
&'life0 self,
block: RpcRawBlock,
allow_non_daa_blocks: bool,
) -> Pin<Box<dyn Future<Output = Result<SubmitBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn submit_block<'life0, 'async_trait>(
&'life0 self,
block: RpcRawBlock,
allow_non_daa_blocks: bool,
) -> Pin<Box<dyn Future<Output = Result<SubmitBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_block_template<'life0, 'async_trait>(
&'life0 self,
pay_address: Address,
extra_data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<GetBlockTemplateResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_template<'life0, 'async_trait>(
&'life0 self,
pay_address: Address,
extra_data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<GetBlockTemplateResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_peer_addresses<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetPeerAddressesResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_peer_addresses<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetPeerAddressesResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_sink<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetSinkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_sink<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetSinkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_mempool_entry<'life0, 'async_trait>(
&'life0 self,
transaction_id: Hash,
include_orphan_pool: bool,
filter_transaction_pool: bool,
) -> Pin<Box<dyn Future<Output = Result<RpcMempoolEntry, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mempool_entry<'life0, 'async_trait>(
&'life0 self,
transaction_id: Hash,
include_orphan_pool: bool,
filter_transaction_pool: bool,
) -> Pin<Box<dyn Future<Output = Result<RpcMempoolEntry, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_mempool_entries<'life0, 'async_trait>(
&'life0 self,
include_orphan_pool: bool,
filter_transaction_pool: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcMempoolEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mempool_entries<'life0, 'async_trait>(
&'life0 self,
include_orphan_pool: bool,
filter_transaction_pool: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcMempoolEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_connected_peer_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetConnectedPeerInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_connected_peer_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetConnectedPeerInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn add_peer<'life0, 'async_trait>(
&'life0 self,
peer_address: ContextualNetAddress,
is_permanent: bool,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn add_peer<'life0, 'async_trait>(
&'life0 self,
peer_address: ContextualNetAddress,
is_permanent: bool,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn submit_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: RpcTransaction,
allow_orphan: bool,
) -> Pin<Box<dyn Future<Output = Result<Hash, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn submit_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: RpcTransaction,
allow_orphan: bool,
) -> Pin<Box<dyn Future<Output = Result<Hash, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn submit_transaction_replacement<'life0, 'async_trait>(
&'life0 self,
transaction: RpcTransaction,
) -> Pin<Box<dyn Future<Output = Result<SubmitTransactionReplacementResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn submit_transaction_replacement<'life0, 'async_trait>(
&'life0 self,
transaction: RpcTransaction,
) -> Pin<Box<dyn Future<Output = Result<SubmitTransactionReplacementResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_block<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
include_transactions: bool,
) -> Pin<Box<dyn Future<Output = Result<RpcBlock, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
include_transactions: bool,
) -> Pin<Box<dyn Future<Output = Result<RpcBlock, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_subnetwork<'life0, 'async_trait>(
&'life0 self,
subnetwork_id: SubnetworkId,
) -> Pin<Box<dyn Future<Output = Result<GetSubnetworkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_subnetwork<'life0, 'async_trait>(
&'life0 self,
subnetwork_id: SubnetworkId,
) -> Pin<Box<dyn Future<Output = Result<GetSubnetworkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_virtual_chain_from_block<'life0, 'async_trait>(
&'life0 self,
start_hash: Hash,
include_accepted_transaction_ids: bool,
) -> Pin<Box<dyn Future<Output = Result<GetVirtualChainFromBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_virtual_chain_from_block<'life0, 'async_trait>(
&'life0 self,
start_hash: Hash,
include_accepted_transaction_ids: bool,
) -> Pin<Box<dyn Future<Output = Result<GetVirtualChainFromBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
start_hash to this node’s current virtual.Source§fn get_blocks<'life0, 'async_trait>(
&'life0 self,
low_hash: Option<Hash>,
include_blocks: bool,
include_transactions: bool,
) -> Pin<Box<dyn Future<Output = Result<GetBlocksResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_blocks<'life0, 'async_trait>(
&'life0 self,
low_hash: Option<Hash>,
include_blocks: bool,
include_transactions: bool,
) -> Pin<Box<dyn Future<Output = Result<GetBlocksResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
low_hash up to this node’s current virtual.Source§fn get_block_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockCount, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockCount, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_block_dag_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetBlockDagInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_dag_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetBlockDagInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn resolve_finality_conflict<'life0, 'async_trait>(
&'life0 self,
finality_block_hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_headers<'life0, 'async_trait>(
&'life0 self,
start_hash: Hash,
limit: u64,
is_ascending: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcHeader>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_headers<'life0, 'async_trait>(
&'life0 self,
start_hash: Hash,
limit: u64,
is_ascending: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcHeader>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
start_hash and the current virtual, up to the given limit.Source§fn get_balance_by_address<'life0, 'async_trait>(
&'life0 self,
address: Address,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_balance_by_address<'life0, 'async_trait>(
&'life0 self,
address: Address,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_balances_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcBalancesByAddressesEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_utxos_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcUtxosByAddressesEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_utxos_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcUtxosByAddressesEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_sink_blue_score<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_sink_blue_score<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn ban<'life0, 'async_trait>(
&'life0 self,
ip: IpAddress,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn ban<'life0, 'async_trait>(
&'life0 self,
ip: IpAddress,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn unban<'life0, 'async_trait>(
&'life0 self,
ip: IpAddress,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn unban<'life0, 'async_trait>(
&'life0 self,
ip: IpAddress,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn get_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn estimate_network_hashes_per_second<'life0, 'async_trait>(
&'life0 self,
window_size: u32,
start_hash: Option<Hash>,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mempool_entries_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>,
include_orphan_pool: bool,
filter_transaction_pool: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcMempoolEntryByAddress>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_coin_supply<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetCoinSupplyResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_daa_score_timestamp_estimate<'life0, 'async_trait>(
&'life0 self,
daa_scores: Vec<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u64>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_fee_estimate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<RpcFeeEstimate, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_fee_estimate_experimental<'life0, 'async_trait>(
&'life0 self,
verbose: bool,
) -> Pin<Box<dyn Future<Output = Result<GetFeeEstimateExperimentalResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_current_block_color<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
) -> Pin<Box<dyn Future<Output = Result<GetCurrentBlockColorResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn execute_subscribe_command<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope,
command: Command,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn execute_subscribe_command<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope,
command: Command,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl Freeze for GrpcClient
impl !RefUnwindSafe for GrpcClient
impl Send for GrpcClient
impl Sync for GrpcClient
impl Unpin for GrpcClient
impl !UnwindSafe for GrpcClient
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
Source§impl<T> CastFrom for Twhere
T: Any + 'static,
impl<T> CastFrom for Twhere
T: Any + 'static,
Source§fn ref_any(&self) -> &(dyn Any + 'static)
fn ref_any(&self) -> &(dyn Any + 'static)
Any, which is backed by the type implementing this trait.Source§fn mut_any(&mut self) -> &mut (dyn Any + 'static)
fn mut_any(&mut self) -> &mut (dyn Any + 'static)
Any, which is backed by the type implementing this trait.Source§impl<T> CastFromSync for T
impl<T> CastFromSync for T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§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<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request