Trait AbstractNode

Source
pub trait AbstractNode:
    Send
    + Sync
    + 'static {
    // Required methods
    fn endpoint(&self) -> &Endpoint;
    fn shutdown(&self);

    // Provided methods
    fn rpc_addr(&self) -> Option<SocketAddr> { ... }
    fn stats(&self) -> Result<BTreeMap<String, CounterStats>> { ... }
}
Expand description

Trait that provides fields used by the rpc handler for the net and node requests.

Required Methods§

Source

fn endpoint(&self) -> &Endpoint

Get the endpoint of the node

Source

fn shutdown(&self)

Shutdown the node, used by the node shutdown rpc call

Provided Methods§

Source

fn rpc_addr(&self) -> Option<SocketAddr>

Rpc address of the node, used by the node status rpc call

Source

fn stats(&self) -> Result<BTreeMap<String, CounterStats>>

Stats for the node stats rpc call

Implementors§