Struct miow::iocp::CompletionPort[][src]

pub struct CompletionPort { /* fields omitted */ }
Expand description

A handle to an Windows I/O Completion Port.

Implementations

Creates a new I/O completion port with the specified concurrency value.

The number of threads given corresponds to the level of concurrency allowed for threads associated with this port. Consult the Windows documentation for more information about this value.

Associates a new HANDLE to this I/O completion port.

This function will associate the given handle to this port with the given token to be returned in status messages whenever it receives a notification.

Any object which is convertible to a HANDLE via the AsRawHandle trait can be provided to this function, such as std::fs::File and friends.

Associates a new SOCKET to this I/O completion port.

This function will associate the given socket to this port with the given token to be returned in status messages whenever it receives a notification.

Any object which is convertible to a SOCKET via the AsRawSocket trait can be provided to this function, such as std::net::TcpStream and friends.

Dequeue a completion status from this I/O completion port.

This function will associate the calling thread with this completion port and then wait for a status message to become available. The precise semantics on when this function returns depends on the concurrency value specified when the port was created.

A timeout can optionally be specified to this function. If None is provided this function will not time out, and otherwise it will time out after the specified duration has passed.

On success this will return the status message which was dequeued from this completion port.

Dequeues a number of completion statuses from this I/O completion port.

This function is the same as get except that it may return more than one status. A buffer of “zero” statuses is provided (the contents are not read) and then on success this function will return a sub-slice of statuses which represent those which were dequeued from this port. This function does not wait to fill up the entire list of statuses provided.

Like with get, a timeout may be specified for this operation.

Posts a new completion status onto this I/O completion port.

This function will post the given status, with custom parameters, to the port. Threads blocked in get or get_many will eventually receive this status.

Trait Implementations

Extracts the raw handle, without taking any ownership.

Formats the value using the given formatter. Read more

Constructs a new I/O object from the specified raw handle. Read more

Consumes this object, returning the raw underlying handle. 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.

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.