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 handle_signals() -> Arc<OnceCell<Self>> { ... }
}

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 handle_signals() -> Arc<OnceCell<Self>>

Handles OS signals for the node to intercept and perform a clean shutdown. Note: Only Ctrl-C is supported; it should work on both Unix-family systems and Windows.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<N: Network, C: ConsensusStorage<N>> NodeInterface<N> for Client<N, C>

source§

impl<N: Network, C: ConsensusStorage<N>> NodeInterface<N> for Prover<N, C>

source§

impl<N: Network, C: ConsensusStorage<N>> NodeInterface<N> for Validator<N, C>