Struct libp2p_core::connection::Connection[][src]

pub struct Connection<TMuxer, THandler> where
    TMuxer: StreamMuxer,
    THandler: ConnectionHandler<Substream = Substream<TMuxer>>, 
{ /* fields omitted */ }
Expand description

A multiplexed connection to a peer with an associated ConnectionHandler.

Implementations

Builds a new Connection from the given substream multiplexer and connection handler.

Returns a reference to the ConnectionHandler

Returns a mutable reference to the ConnectionHandler

Notifies the connection handler of an event.

Begins an orderly shutdown of the connection, returning the connection handler and a Future that resolves when connection shutdown is complete.

Polls the connection for events produced by the associated handler as a result of I/O activity on the substream multiplexer.

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

Performs the conversion.

Performs the conversion.

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.