Struct routing::NodeBuilder [−][src]
pub struct NodeBuilder { /* fields omitted */ }
A builder to configure and create a new Node
.
Methods
impl NodeBuilder
[src]
impl NodeBuilder
pub fn cache(self, cache: Box<Cache>) -> NodeBuilder
[src]
pub fn cache(self, cache: Box<Cache>) -> NodeBuilder
Configures the node to use the given request cache.
pub fn first(self, first: bool) -> NodeBuilder
[src]
pub fn first(self, first: bool) -> NodeBuilder
Configures the node to start a new network instead of joining an existing one.
pub fn config(self, config: Config) -> NodeBuilder
[src]
pub fn config(self, config: Config) -> NodeBuilder
The node will use the configuration options from config
rather than defaults.
pub fn create(self) -> Result<Node, RoutingError>
[src]
pub fn create(self) -> Result<Node, RoutingError>
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.
Auto Trait Implementations
impl Send for NodeBuilder
impl Send for NodeBuilder
impl !Sync for NodeBuilder
impl !Sync for NodeBuilder