[][src]Struct exonum_node::NodeBuilder

pub struct NodeBuilder { /* fields omitted */ }

Builder for Node.

Methods

impl NodeBuilder[src]

pub fn new(
    database: impl Into<Arc<dyn Database>>,
    node_config: NodeConfig,
    node_keys: Keys
) -> Self
[src]

Instantiates a builder.

pub fn with_genesis_config(self, genesis_config: GenesisConfig) -> Self[src]

Adds a genesis config to use if the blockchain is not initialized yet.

pub fn with_runtime<T>(self, runtime: T) -> Self where
    T: Into<RuntimeInstance>, 
[src]

Adds a runtime to the blockchain.

pub fn with_runtime_fn<T, F>(self, runtime_fn: F) -> Self where
    T: Into<RuntimeInstance>,
    F: FnOnce(&NodeChannel) -> T, 
[src]

Adds a runtime which depends on a NodeChannel (e.g., to update HTTP API of the node).

pub fn with_config_manager<T: ConfigManager + 'static>(self, manager: T) -> Self[src]

Adds the configuration manager.

pub fn with_block_proposer<T: ProposeBlock + 'static>(self, proposer: T) -> Self[src]

Sets custom Propose creation logic for the node.

Stability and safety

Using a custom proposer CAN LEAD TO CONSENSUS FAILURE. See the proposer module docs for more details.

pub fn with_plugin<T: NodePlugin + 'static>(self, plugin: T) -> Self[src]

Adds a plugin.

pub fn disable_signals(self) -> Self[src]

Switches off default signal handling for the node. This is useful to implement more complex signal handling, or one that differs from the default.

If you use custom signal handlers, the node may be shut down gracefully using ShutdownHandle.

pub fn build(self) -> Node[src]

Converts this builder into a Node.

Trait Implementations

impl Debug for NodeBuilder[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,