[][src]Struct wasi_common::OsDir

pub struct OsDir { /* fields omitted */ }

A directory in the operating system's file system. Its impl of Handle is in sys::osdir. This type is exposed to all other modules as sys::osdir::OsDir when configured.

Constructing OsDir

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

use std::fs::OpenOptions;
use std::convert::TryFrom;
use std::os::windows::fs::OpenOptionsExt;
use wasi_common::OsDir;
use winapi::um::winbase::FILE_FLAG_BACKUP_SEMANTICS;

let dir = OpenOptions::new().read(true).attributes(FILE_FLAG_BACKUP_SEMANTICS).open("some_dir").unwrap();
let os_dir = OsDir::try_from(dir).unwrap();

Trait Implementations

impl Debug for OsDir[src]

impl Deref for OsDir[src]

type Target = RawOsHandle

The resulting type after dereferencing.

impl Handle for OsDir[src]

impl TryFrom<File> for OsDir[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl !RefUnwindSafe for OsDir

impl !Send for OsDir

impl !Sync for OsDir

impl Unpin for OsDir

impl UnwindSafe for OsDir

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> 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.