Module smoldot::libp2p[][src]

Collection of libp2p connections.

The Network struct in this module is a collection of libp2p connections. It uses internal buffering and interior mutability in order to provide a convenient-to-use API based around notifications protocols and request-response protocols.

Re-exports

pub use established::ConfigRequestResponse;
pub use established::ConfigRequestResponseIn;
pub use peer_id::PeerId;

Modules

connection

Module containing everything related to the processing of a single libp2p connection.

discovery

Mechanisms related to discovering nodes that are part of a certain overlay network.

multiaddr
peer_id
peerset

Data structure storing a networking state. Helper for managing connectivity to overlay networks.

Structs

Config

Configuration for a Network.

ConnectionId

Identifier of a connection spawned by the Network.

ConnectionReadyFuture

Future ready when a connection has data to give out via Network::read_write.

Multiaddr

Representation of a Multiaddr.

Network

Data structure containing the list of all connections, pending or not, and their latest known state. See also the module-level documentation.

OverlayNetwork

Configuration for a specific overlay network.

PendingId

Identifier of a pending connection requested by the network through a StartConnect.

ReadWrite

Outcome of calling Network::read_write.

StartConnect

User must start connecting to the given multiaddress.

SubstreamOpen

Enums

ConnectionError

Protocol error within the context of a connection. See Network::read_write.

Event

Event generated by Network::next_event.

QueueNotificationError

Error potentially returned by Network::queue_notification.

RequestError

Error potentially returned by Network::request.