[][src]Struct nakamoto_node::node::NodeHandle

pub struct NodeHandle { /* fields omitted */ }

An instance of Handle for Node.

Implementations

impl NodeHandle[src]

pub fn set_timeout(&mut self, timeout: Duration)[src]

Set the timeout for operations that wait on the network.

pub fn command(&self, cmd: Command) -> Result<(), Error>[src]

Send a command to the command channel, and wake up the event loop.

Trait Implementations

impl Handle for NodeHandle[src]

type Message = NetworkMessage

The message payload exchanged between nodes in the network.

type Event = Event<NetworkMessage>

Node event generated during protocol operation.

fn wait<F, T>(&self, f: F) -> Result<T, Error> where
    F: Fn(Event<NetworkMessage>) -> Option<T>, 
[src]

Subscribe to the event feed, and wait for the given function to return something, or timeout if the specified amount of time has elapsed.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.