logo
pub struct MplexConfig { /* private fields */ }
Expand description

Configuration for the multiplexer.

Implementations

Builds the default configuration.

Sets the maximum number of simultaneously used substreams.

A substream is used as long as it has not been dropped, even if it may already be closed or reset at the protocol level (in which case it may still have buffered data that can be read before the StreamMuxer API signals EOF).

When the limit is reached, opening of outbound substreams is delayed until another substream is dropped, whereas new inbound substreams are immediately answered with a Reset. If the number of inbound substreams that need to be reset accumulates too quickly (judged by internal bounds), the connection is closed with an error due to the misbehaved remote.

Sets the maximum number of frames buffered per substream.

A limit is necessary in order to avoid DoS attacks.

Sets the behaviour when the maximum buffer size is reached for a substream.

See the documentation of MaxBufferBehaviour.

Sets the frame size used when sending data. Capped at 1Mbyte as per the Mplex spec.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Output after the upgrade has been successfully negotiated and the handshake performed.

Possible error during the handshake.

Future that performs the handshake with the remote.

After we have determined that the remote supports one of the protocols we support, this method is called to start the handshake. Read more

Output after the upgrade has been successfully negotiated and the handshake performed.

Possible error during the handshake.

Future that performs the handshake with the remote.

After we have determined that the remote supports one of the protocols we support, this method is called to start the handshake. Read more

Opaque type representing a negotiable protocol.

Iterator returned by protocol_info.

Returns the list of protocols that are supported. Used during the negotiation process.

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.

Returns a new object that wraps around Self and applies a closure to the Output.

Returns a new object that wraps around Self and applies a closure to the Error.

Calls U::from(self).

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

Returns a new object that wraps around Self and applies a closure to the Output.

Returns a new object that wraps around Self and applies a closure to the Error.

Should always be Self

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)

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.