[][src]Struct wslapi::Stdio

pub struct Stdio { /* fields omitted */ }

A WslLaunch stdin, stdout, or stderr parameter

Implementations

impl Stdio[src]

pub fn null() -> Self[src]

This stream will be ignored. This is the equivalent of attaching the stream to /dev/null

pub fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self>[src]

Stream data from a temporary file containing the contents of bytes

pub fn from_file(file: File) -> Result<Self>[src]

Stream data from or into a file handle

pub unsafe fn from_handle(handle: HANDLE) -> Self[src]

Take ownership of a raw handle

Safety

handle is assumed to be "valid". That is:

pub unsafe fn from_as_raw_handle(owner: impl AsRawHandle + 'static) -> Self[src]

Take ownership of something with a raw handle

Safety

owner.as_raw_handle() is assumed to be "valid". That is:

pub fn as_raw_handle(&self) -> RawHandle[src]

Get a standard std::os::windows::{io::RawHandle / raw::HANDLE}

pub fn as_winapi_handle(&self) -> HANDLE[src]

Get a winapi::shared::ntdef::HANDLE

Trait Implementations

impl AsRawHandle for Stdio[src]

impl From<()> for Stdio[src]

impl<'_> TryFrom<&'_ [u8]> for Stdio[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ str> for Stdio[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<File> for Stdio[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<String> for Stdio[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Vec<u8>> for Stdio[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl !RefUnwindSafe for Stdio

impl !Send for Stdio

impl !Sync for Stdio

impl Unpin for Stdio

impl !UnwindSafe for Stdio

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.