pub struct Taple { /* private fields */ }
Expand description

Structure representing a node of a TAPLE network.

A node must be instantiated using the Taple::new method, which requires a set of configuration parameters in order to be properly initialized.

Implementations

Returns the [PeerId] of the node is available. This ID is the identifier of the node at the network level. None can only be get if the node has not been started yet.

Returns the public key (bytes format) of the node is available. None can only be get if the node has not been started yet.

Returns the controller ID of the node is available. This ID is the identifier of the node at the protocol level. None can only be get if the node has not been started yet.

This methods allows to get the API of the node. The API can be get as many time as desired. The API is the only method to interact with a node at the user level.

This method allows to get an instance of NotificationHandler. This component is used by the node to report any important events that have occurred, for example the creation of new subjects. The component behaves similar to a channel receiver; users only have to call the NotificationHandler::receive method to start receiving notifications.

Main and unique method to create an instance of a TAPLE node.

Instance a default settings to start a new Taple Node

This method initializes a TAPLE node, generating each of its internal components and allowing subsequent interaction with the node. Each of the aforementioned components is executed in its own Tokyo task, allowing the method to return the control flow once its execution is finished.

Possible results

If the process is successful, the method will return Ok(()). An error will be returned only if it has not been possible to generate the necessary data for the initialization of the components, mainly due to problems in the initial configuration.

Panics

This method panics if it has not been possible to generate the network layer.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more