pub struct Overlapped(/* private fields */);Expand description
A wrapper around OVERLAPPED to provide “rustic” accessors and
initializers.
Implementations§
Source§impl Overlapped
impl Overlapped
Sourcepub fn zero() -> Overlapped
pub fn zero() -> Overlapped
Creates a new zeroed out instance of an overlapped I/O tracking state.
This is suitable for passing to methods which will then later get notified via an I/O Completion Port.
Sourcepub fn initialize_with_autoreset_event() -> Result<Overlapped>
pub fn initialize_with_autoreset_event() -> Result<Overlapped>
Creates a new Overlapped with an initialized non-null hEvent. The caller is
responsible for calling CloseHandle on the hEvent field of the returned
Overlapped. The event is created with bManualReset set to FALSE, meaning after a
single thread waits on the event, it will be reset.
Sourcepub unsafe fn from_raw<'a>(ptr: *mut OVERLAPPED) -> &'a mut Overlapped
pub unsafe fn from_raw<'a>(ptr: *mut OVERLAPPED) -> &'a mut Overlapped
Creates a new Overlapped function pointer from the underlying
OVERLAPPED, wrapping in the “rusty” wrapper for working with
accessors.
§Safety
This function doesn’t validate ptr nor the lifetime of the returned
pointer at all, it’s recommended to use this method with extreme
caution.
Sourcepub fn set_offset(&mut self, offset: u64)
pub fn set_offset(&mut self, offset: u64)
Sets the offset inside this overlapped structure.
Note that for I/O operations in general this only has meaning for I/O handles that are on a seeking device that supports the concept of an offset.