Trait parity_rpc::v1::Net
source · [−]pub trait Net: Sized + Send + Sync + 'static {
fn version(&self) -> Result<String>;
fn peer_count(&self) -> Result<String>;
fn is_listening(&self) -> Result<bool>;
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> { ... }
}
Expand description
Net rpc interface.
Required methods
fn peer_count(&self) -> Result<String>
fn peer_count(&self) -> Result<String>
Returns number of peers connected to node.
fn is_listening(&self) -> Result<bool>
fn is_listening(&self) -> Result<bool>
Returns true if client is actively listening for network connections. Otherwise false.
Provided methods
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
Create an IoDelegate
, wiring rpc calls to the trait methods.