[][src]Struct nakamoto_node::node::Node

pub struct Node {
    pub config: NodeConfig,
    // some fields omitted
}

A light-node process.

Fields

config: NodeConfig

Implementations

impl Node[src]

pub fn new(config: NodeConfig) -> Result<Self, Error>[src]

Create a new node.

pub fn seed<S: ToSocketAddrs>(&mut self, seeds: Vec<S>) -> Result<(), Error>[src]

Seed the node's address book with peer addresses.

pub fn run(self) -> Result<(), Error>[src]

Start the node process. This function is meant to be run in its own thread.

pub fn run_with<T: BlockTree>(self, cache: T) -> Result<(), Error>[src]

Start the node process, supplying the block cache. This function is meant to be run in its own thread.

pub fn handle(&mut self) -> NodeHandle[src]

Create a new handle to communicate with the node.

Auto Trait Implementations

impl RefUnwindSafe for Node

impl Send for Node

impl Sync for Node

impl Unpin for Node

impl UnwindSafe for Node

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.