Struct mtcp_rs::TcpManager

source ·
pub struct TcpManager { /* private fields */ }
Expand description

A manager for “shared” resources, used by mtcp::TcpListener and mtcp::TcpStream

The same mtcp::TcpManager instance can be shared by multiple mtcp::TcpListener and mtcp::TcpStream instances. However, an mtcp::TcpManager instance can not be shared across the thread boundary: Each thread needs to create its own mtcp::TcpManager instance. A thread-local singleton instance can be obtained via the instance() function.

The canceller() function can be used to obtain a new mtcp::TcpCanceller instance for this mtcp::TcpManager.

Implementations§

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

Returns the argument unchanged.

Calls U::from(self).

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

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.