Skip to main content

NodeInterface

Trait NodeInterface 

Source
pub trait NodeInterface<N: Network>: Routing<N> {
    // Required method
    fn shut_down<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn node_type(&self) -> NodeType { ... }
    fn private_key(&self) -> &PrivateKey<N> { ... }
    fn view_key(&self) -> &ViewKey<N> { ... }
    fn address(&self) -> Address<N> { ... }
    fn is_dev(&self) -> bool { ... }
    fn wait_for_signals<'life0, 'life1, 'async_trait>(
        &'life0 self,
        handler: &'life1 SignalHandler,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

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

Shuts down the node.

Provided Methods§

Source

fn node_type(&self) -> NodeType

Returns the node type.

Source

fn private_key(&self) -> &PrivateKey<N>

Returns the account private key of the node.

Source

fn view_key(&self) -> &ViewKey<N>

Returns the account view key of the node.

Source

fn address(&self) -> Address<N>

Returns the account address of the node.

Source

fn is_dev(&self) -> bool

Returns true if the node is in development mode.

Source

fn wait_for_signals<'life0, 'life1, 'async_trait>( &'life0 self, handler: &'life1 SignalHandler, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Blocks until a shutdown signal was received or manual shutdown was triggered.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§