Trait winsafe::prelude::kernel_Hpipe

source ·
pub trait kernel_Hpipe: Handle {
    // Provided methods
    fn CreatePipe(
        attrs: Option<&mut SECURITY_ATTRIBUTES<'_>>,
        size: u32
    ) -> SysResult<(CloseHandleGuard<HPIPE>, CloseHandleGuard<HPIPE>)> { ... }
    fn ReadFile(&self, buffer: &mut [u8]) -> SysResult<u32> { ... }
    fn WriteFile(&self, data: &[u8]) -> SysResult<u32> { ... }
}
Available on crate feature kernel only.
Expand description

This trait is enabled with the kernel feature, and provides methods for HPIPE.

Prefer importing this trait through the prelude:

use winsafe::prelude::*;

Provided Methods§

source

fn CreatePipe( attrs: Option<&mut SECURITY_ATTRIBUTES<'_>>, size: u32 ) -> SysResult<(CloseHandleGuard<HPIPE>, CloseHandleGuard<HPIPE>)>

CreatePipe function.

Returns handles to the read and write pipes.

source

fn ReadFile(&self, buffer: &mut [u8]) -> SysResult<u32>

ReadFile function.

Returns the number of bytes read.

Note that asynchronous reading – which use the OVERLAPPED struct – is not currently supported by this method, because the buffer must remain untouched until the async operation is complete, thus making the method unsound.

source

fn WriteFile(&self, data: &[u8]) -> SysResult<u32>

WriteFile function.

Returns the number of bytes written.

Note that asynchronous writing – which use the OVERLAPPED struct – is not currently supported by this method, because the buffer must remain untouched until the async operation is complete, thus making the method unsound.

Object Safety§

This trait is not object safe.

Implementors§