Struct pea2pea::Node[][src]

pub struct Node(_);
Expand description

The central object responsible for handling all the connections.

Implementations

Creates a new Node optionally using a given Config.

Returns the name assigned to the node.

Returns a reference to the node’s config.

Returns a reference to the node’s stats.

Returns the tracing Span associated with the node.

Returns the node’s listening address; returns an error if the node was configured to not listen for inbound connections.

Connects to the provided SocketAddr.

Disconnects from the provided SocketAddr.

Returns a list containing addresses of active connections.

Returns a reference to the collection of statistics of node’s known peers.

Checks whether the provided address is connected.

Returns the number of active connections.

Returns the number of connections that are currently being set up.

Gracefully shuts the node down.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The resulting type after dereferencing.

Dereferences the value.

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

Performs the conversion.

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

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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