[−][src]Struct exonum_node::NodeBuilder
Builder for Node
.
Methods
impl NodeBuilder
[src]
pub fn new(
database: impl Into<Arc<dyn Database>>,
node_config: NodeConfig,
node_keys: Keys
) -> Self
[src]
database: impl Into<Arc<dyn Database>>,
node_config: NodeConfig,
node_keys: Keys
) -> Self
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]
T: Into<RuntimeInstance>,
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]
T: Into<RuntimeInstance>,
F: FnOnce(&NodeChannel) -> T,
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
Auto Trait Implementations
impl !RefUnwindSafe for NodeBuilder
impl Send for NodeBuilder
impl !Sync for NodeBuilder
impl Unpin for NodeBuilder
impl !UnwindSafe for NodeBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,