GrpcClient

Struct GrpcClient 

Source
pub struct GrpcClient { /* private fields */ }

Implementations§

Source§

impl GrpcClient

Source

pub const DIRECT_MODE_LISTENER_ID: ListenerId = 0u64

Source

pub async fn connect(url: String) -> Result<GrpcClient>

Source

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 the RpcApi implementation. Registering listeners is needed before subscribing to notifications.
  • Direct => A single listener receives the notification via a channel (see self.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

Source

pub fn notifier(&self) -> Option<Arc<GrpcClientNotifier>>

Source

pub async fn start(&self, notify: Option<GrpcClientNotify>)

Starts RPC services.

Source

pub async fn join(&self) -> Result<()>

Joins on RPC services.

Source

pub fn is_connected(&self) -> bool

Source

pub fn handle_message_id(&self) -> bool

Source

pub fn handle_stop_notify(&self) -> bool

Source

pub async fn disconnect(&self) -> Result<()>

Source

pub fn notification_channel_receiver(&self) -> Receiver<Notification>

Source

pub fn notification_mode(&self) -> NotificationMode

Trait Implementations§

Source§

impl Clone for GrpcClient

Source§

fn clone(&self) -> GrpcClient

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GrpcClient

Source§

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

Formats the value using the given formatter. Read more
Source§

impl RpcApi for GrpcClient

Source§

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,

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,

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,

Stop sending notifications of some type to a listener.

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

fn ping<'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_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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Requests the network the node is currently running against.
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,

Submit a block into the DAG. Read more
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,

Request a current block template. Read more
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,

Requests the list of known kaspad addresses in the current network (mainnet, testnet, etc.)
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,

requests the hash of the current virtual’s selected parent.
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,

Requests information about a specific transaction in the mempool.
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,

Requests information about all the transactions currently in the mempool.
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,

requests information about all the p2p peers currently connected to this node.
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,

Adds a peer to the node’s outgoing connection list. Read more
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,

Submits a transaction to the mempool.
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,

Submits a transaction replacement to the mempool, applying a mandatory Replace by Fee policy. Read more
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,

Requests information about a specific block.
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,

Requests information about a specific subnetwork.
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,

Requests the virtual selected parent chain from some 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,

Requests blocks between a certain block 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,

Requests the current number of blocks in this node. Read more
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,

Requests general information about the current state of this node’s DAG.
Source§

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,

Shuts down this node.
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,

Requests headers between the given 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,

Returns the total balance in unspent transactions towards a given address. Read more
Source§

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,

Requests all current UTXOs for the given node addresses. Read more
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,

Requests the blue score of the current selected parent of the virtual block.
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,

Bans the given ip.
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,

Unbans the given ip.
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,

Returns info about the node.
Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Execute a subscription command leading to either start or stop sending notifications of some type to a listener.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Any for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Source§

fn type_name(&self) -> &'static str

Source§

impl<T> AnySync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Source§

impl<T> AsAny for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
Source§

impl<S> CastArc for S
where S: CastFromSync + ?Sized,

Source§

fn cast<T>(self: Arc<S>) -> Result<Arc<T>, Arc<S>>
where T: 'static + ?Sized,

Casts an Arc for this trait into that for type T.
Source§

impl<S> CastBox for S
where S: CastFrom + ?Sized,

Source§

fn cast<T>(self: Box<S>) -> Result<Box<T>, Box<S>>
where T: 'static + ?Sized,

Casts a box to this trait into that of type T. If fails, returns the receiver.
Source§

impl<T> CastFrom for T
where T: Any + 'static,

Source§

fn ref_any(&self) -> &(dyn Any + 'static)

Returns a immutable reference to Any, which is backed by the type implementing this trait.
Source§

fn mut_any(&mut self) -> &mut (dyn Any + 'static)

Returns a mutable reference to Any, which is backed by the type implementing this trait.
Source§

fn box_any(self: Box<T>) -> Box<dyn Any>

Returns a Box of Any, which is backed by the type implementing this trait.
Source§

fn rc_any(self: Rc<T>) -> Rc<dyn Any>

Returns an Rc of Any, which is backed by the type implementing this trait.
Source§

impl<T> CastFromSync for T
where T: Sync + Send + 'static,

Source§

fn arc_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Source§

impl<S> CastMut for S
where S: CastFrom + ?Sized,

Source§

fn cast<T>(&mut self) -> Option<&mut T>
where T: 'static + ?Sized,

Casts a mutable reference to this trait into that of type T.
Source§

impl<S> CastRc for S
where S: CastFrom + ?Sized,

Source§

fn cast<T>(self: Rc<S>) -> Result<Rc<T>, Rc<S>>
where T: 'static + ?Sized,

Casts an Rc for this trait into that for type T.
Source§

impl<S> CastRef for S
where S: CastFrom + ?Sized,

Source§

fn cast<T>(&self) -> Option<&T>
where T: 'static + ?Sized,

Casts a reference to this trait into that of type T.
Source§

fn impls<T>(&self) -> bool
where T: 'static + ?Sized,

Tests if this trait object can be cast into T.
Source§

impl<T> CloneAny for T
where T: Any + Clone + Send + Sync,

§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

fn exact_from(value: T) -> U

Source§

impl<T, U> ExactInto<U> for T
where U: ExactFrom<T>,

Source§

fn exact_into(self) -> U

§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

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

§

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

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T, U> OverflowingInto<U> for T
where U: OverflowingFrom<T>,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T, U> RoundingInto<U> for T
where U: RoundingFrom<T>,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> SaturatingInto<U> for T
where U: SaturatingFrom<T>,

Source§

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

Source§

fn to_debug_string(&self) -> String

Returns the String produced by Ts Debug implementation.

§Examples
use malachite_base::strings::ToDebugString;

assert_eq!([1, 2, 3].to_debug_string(), "[1, 2, 3]");
assert_eq!(
    [vec![2, 3], vec![], vec![4]].to_debug_string(),
    "[[2, 3], [], [4]]"
);
assert_eq!(Some(5).to_debug_string(), "Some(5)");
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

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

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T, U> WrappingInto<U> for T
where U: WrappingFrom<T>,

Source§

fn wrapping_into(self) -> U

Source§

impl<T> DebugAny for T
where T: Any + Debug,

Source§

impl<T> UnsafeAny for T
where T: Any,