Skip to main content

NodeManager

Trait NodeManager 

Source
pub trait NodeManager:
    Send
    + Sync
    + Any
    + Debug {
    // Required methods
    fn start<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stop<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_state<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<NodeState, TransportError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rpc_port(&self) -> u16;
    fn rpc_username(&self) -> &str;
    fn rpc_password(&self) -> &str;
    fn create_transport<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<DefaultTransport>, TransportError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait defining the interface for a node manager

Required Methods§

Source

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

Source

fn stop<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_state<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<NodeState, TransportError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn rpc_port(&self) -> u16

Return the RPC port this manager was configured with

Source

fn rpc_username(&self) -> &str

Return the RPC username this manager was configured with

Source

fn rpc_password(&self) -> &str

Return the RPC password this manager was configured with

Source

fn create_transport<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Arc<DefaultTransport>, TransportError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a transport for communicating with the node

Implementors§