pub struct AnonPipe {
inner: Handle,
}
Fields§
§inner: Handle
Implementations§
source§impl AnonPipe
impl AnonPipe
pub fn handle(&self) -> &Handle ⓘ
pub fn into_handle(self) -> Handle ⓘ
fn duplicate(&self) -> Result<Self>
pub fn read(&self, buf: &mut [u8]) -> Result<usize>
pub fn read_buf(&self, buf: BorrowedCursor<'_>) -> Result<()>
pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
pub fn is_read_vectored(&self) -> bool
pub fn read_to_end(&self, buf: &mut Vec<u8>) -> Result<usize>
pub fn write(&self, buf: &[u8]) -> Result<usize>
pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> Result<usize>
pub fn is_write_vectored(&self) -> bool
sourceunsafe fn alertable_io_internal(
&self,
io: unsafe extern "system" fn(_: BorrowedHandle<'_>, _: *mut c_void, _: c_ulong, _: *mut OVERLAPPED, _: Option<unsafe extern "system" fn(dwerrorcode: u32, dwnumberofbytestransfered: u32, lpoverlapped: *mut OVERLAPPED)>) -> i32,
buf: *mut c_void,
len: c_ulong
) -> Result<usize>
unsafe fn alertable_io_internal( &self, io: unsafe extern "system" fn(_: BorrowedHandle<'_>, _: *mut c_void, _: c_ulong, _: *mut OVERLAPPED, _: Option<unsafe extern "system" fn(dwerrorcode: u32, dwnumberofbytestransfered: u32, lpoverlapped: *mut OVERLAPPED)>) -> i32, buf: *mut c_void, len: c_ulong ) -> Result<usize>
Synchronizes asynchronous reads or writes using our anonymous pipe.
This is a wrapper around ReadFileEx
or WriteFileEx
that uses
Asynchronous Procedure Call (APC) to synchronize reads or writes.
Note: This should not be used for handles we don’t create.
Safety
buf
must be a pointer to a buffer that’s valid for reads or writes
up to len
bytes. The AlertableIoFn
must be either ReadFileEx
or WriteFileEx
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for AnonPipe
impl Send for AnonPipe
impl Sync for AnonPipe
impl Unpin for AnonPipe
impl UnwindSafe for AnonPipe
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more