Struct mio::windows::Overlapped
[−]
[src]
#[repr(C)]pub struct Overlapped { /* fields omitted */ }
A wrapper around an internal instance over miow::Overlapped
which is in
turn a wrapper around the Windows type OVERLAPPED
.
This type is required to be used for all IOCP operations on handles that are
registered with an event loop. The event loop will receive notifications
over OVERLAPPED
pointers that have completed, and it will cast that
pointer to a pointer to this structure and invoke the associated callback.
Methods
impl Overlapped
[src]
fn new(cb: fn(_: &OVERLAPPED_ENTRY)) -> Overlapped
Creates a new Overlapped
which will invoke the provided cb
callback
whenever it's triggered.
The returned Overlapped
must be used as the OVERLAPPED
passed to all
I/O operations that are registered with mio's event loop. When the I/O
operation associated with an OVERLAPPED
pointer completes the event
loop will invoke the function pointer provided by cb
.
fn as_mut_ptr(&self) -> *mut OVERLAPPED
Get the underlying Overlapped
instance as a raw pointer.
This can be useful when only a shared borrow is held and the overlapped pointer needs to be passed down to winapi.