Struct routing::NodeBuilder [] [src]

pub struct NodeBuilder {
    // some fields omitted
}

A builder to configure and create a new Node.

Methods

impl NodeBuilder
[src]

fn cache(self, cache: Box<Cache>) -> NodeBuilder

Configures the node to use the given request cache.

fn first(self, first: bool) -> NodeBuilder

Configures the node to start a new network instead of joining an existing one.

fn deny_other_local_nodes(self) -> NodeBuilder

Causes node creation to fail if another node on the local network is detected.

fn create(self, event_sender: Sender<Event>) -> Result<NodeRoutingError>

Creates new Node.

It will automatically connect to the network in the same way a client does, but then request a new name and integrate itself into the network using the new name.

The initial Node object will have newly generated keys.