Struct mtcp_rs::TcpManager

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

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

The same mtcp_rs::TcpManager instance can be shared by multiple mtcp_rs::TcpListener and mtcp_rs::TcpStream instances. However, an mtcp_rs::TcpManager instance can not be shared across the thread boundary: Each thread needs to create its own mtcp_rs::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_rs::TcpCanceller instance for this mtcp_rs::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.