[][src]Struct wasi_common::OsOther

pub struct OsOther { /* fields omitted */ }

OsOther is something of a catch-all for everything not covered with the specific handle types (OsFile, OsDir, Stdio). It currently encapsulates handles such as OS pipes, sockets, streams, etc. As such, when redirecting stdio within WasiCtxBuilder, the redirected pipe should be encapsulated within this instance and not OsFile which represents a regular OS file.

Constructing OsOther

OsOther can currently only be constructed from std::fs::File using the std::convert::TryFrom trait:

use std::fs::OpenOptions;
use std::convert::TryFrom;
use wasi_common::OsOther;

let pipe = OpenOptions::new().read(true).open("a_pipe").unwrap();
let os_other = OsOther::try_from(pipe).unwrap();

Trait Implementations

impl Debug for OsOther[src]

impl Deref for OsOther[src]

type Target = RawOsHandle

The resulting type after dereferencing.

impl Handle for OsOther[src]

impl TryFrom<File> for OsOther[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl !RefUnwindSafe for OsOther

impl !Send for OsOther

impl !Sync for OsOther

impl Unpin for OsOther

impl UnwindSafe for OsOther

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> Instrument for T[src]

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

impl<T> Pointee for T[src]

type Pointer = u32

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.