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

Object that allows interaction with a TAPLE node.

It has methods to perform all available read and write operations, as well as an additional action to stop a running node. he interaction is performed thanks to the implementation of a trait known as ApiModuleInterface. Consequently, it is necessary to import the trait in order to properly use the object.

Trait Implementations

Feature that allows implementing the API Rest of an Taple node.

Allows to generate a voting request in the system. This request will be sent to the node that will be in charge of handling the votes of the rest of the nodes belonging to the same governance. Read more
Allows to make a request to the node from an external Invoker
It allows to obtain all the voting requests pending to be resolved in the node. These requests are received from other nodes in the network when they try to update a governance subject. It is necessary to vote their agreement or disagreement with the proposed changes in order for the events to be implemented. Read more
It allows to obtain a single voting request pending to be resolved in the node. This request is received from other nodes in the network when they try to update a governance subject. It is necessary to vote its agreement or disagreement with the proposed changes in order for the events to be implemented. Read more
Allows adding a new event to the chain of a subject previously existing in the node. The event identifier and its payload are required. This method returns the enumerated [CreateRequestResponse], being the identifier of a request when the event intends to update a governance, in which case it will be communicated to the rest of the nodes aware of the governance with the intention that they vote the change contained in the request. In case the event is from a conventional subject, the system returns the created event. Read more
It allows to simulate the creation of an event, obtaining the state that would result from the subject in case the event is actually created. Read more
Allows to get all subjects that are known to the current node, regardless of their governance. Paging can be performed using the optional arguments from and quantity. Regarding the first one, note that it admits negative values, in which case the paging is performed in the opposite direction starting from the end of the collection. Note that this method also returns the subjects that model governance. Read more
It allows to obtain all the subjects that model existing governance in the node. Read more
Allows to obtain events from a specific subject previously existing in the node. Paging can be performed by means of the optional arguments from and quantity. Regarding the former, it should be noted that negative values are allowed, in which case the paging is performed in the opposite direction starting from the end of the string. Read more
Allows to create a new subject in the node, being its owner the node in question. Read more
Allows to obtain a specified subject by specifying its identifier. Read more
Method for creating governance in the system. Read more
Method to obtain the validation signatures of an event from a specified subject. Paging can be performed using the optional arguments from and quantity. Regarding the first one, it is worth mentioning that it admits negative values, in which case the pagination is performed in the opposite direction starting from the end of the collection. Read more
Allows to vote on a voting request that previously exists in the system. This vote will be sent to the corresponding node in charge of its collection. Read more
Stops the node, consuming the instance on the fly. This implies that any previously created API or [NotificationHandler] instances will no longer be functional. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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