[][src]Struct exonum_node::Node

pub struct Node { /* fields omitted */ }

Node capable of processing requests from external clients and participating in the consensus algorithm.

Signal Handling

By default, the node installs several signal hooks. This can be disabled by using disable_signals() method in NodeBuilder.

On Unix, the node will gracefully shut down on receiving any of SIGINT, SIGTERM or SIGQUIT and will ignore SIGHUP. On Windows, the node will gracefully shut down on receiving Ctrl + C break. Graceful shutdown means, among other things, flushing uncommitted transactions into the persistent storage.

Methods

impl Node[src]

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

Launches a Node and optionally creates threads for public and private API handlers, depending on the provided NodeConfig.

pub fn blockchain(&self) -> &Blockchain[src]

Returns the blockchain handle, which can be used to read blockchain state and send transactions to the node.

pub fn shutdown_handle(&self) -> ShutdownHandle[src]

Returns a shutdown handle for the node. It is possible to instantiate multiple handles using this method; only the first call to shutdown the node is guaranteed to succeed (but this single call is enough to stop the node).

Trait Implementations

impl Debug for Node[src]

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.

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