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

The (optional) configuration for a Network.

The default configuration specifies no dedicated task executor, no connection limits, a connection event buffer size of 32, and a notify_handler buffer size of 8.

Implementations

Configures the executor to use for spawning connection background tasks.

Configures the executor to use for spawning connection background tasks, only if no executor has already been configured.

Sets the maximum number of events sent to a connection’s background task that may be buffered, if the task cannot keep up with their consumption and delivery to the connection handler.

When the buffer for a particular connection is full, notify_handler will no longer be able to deliver events to the associated ConnectionHandler, thus exerting back-pressure on the connection and peer API.

Sets the maximum number of buffered connection events (beyond a guaranteed buffer of 1 event per connection).

When the buffer is full, the background tasks of all connections will stall. In this way, the consumers of network events exert back-pressure on the network connection I/O.

Sets the connection limits to enforce.

Trait Implementations

Returns the “default value” for a type. 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.

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 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.