# Trait std::os::wasi::fs::OpenOptionsExt[−][src]

###

###

###

###

###

###

###

###

    pub trait OpenOptionsExt {
        fn lookup_flags(&mut self, flags: u32) -> &mut SelfⓘNotable traits for &'_ mut Iimpl<'_, I> Iterator for &'_ mut I where
        I: Iterator + ?Sized,     type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
        F: Future + Unpin + ?Sized,     type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W;
        fn directory(&mut self, dir: bool) -> &mut SelfⓘNotable traits for &'_ mut Iimpl<'_, I> Iterator for &'_ mut I where
        I: Iterator + ?Sized,     type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
        F: Future + Unpin + ?Sized,     type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W;
        fn dsync(&mut self, dsync: bool) -> &mut SelfⓘNotable traits for &'_ mut Iimpl<'_, I> Iterator for &'_ mut I where
        I: Iterator + ?Sized,     type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
        F: Future + Unpin + ?Sized,     type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W;
        fn nonblock(&mut self, nonblock: bool) -> &mut SelfⓘNotable traits for &'_ mut Iimpl<'_, I> Iterator for &'_ mut I where
        I: Iterator + ?Sized,     type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
        F: Future + Unpin + ?Sized,     type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W;
        fn rsync(&mut self, rsync: bool) -> &mut SelfⓘNotable traits for &'_ mut Iimpl<'_, I> Iterator for &'_ mut I where
        I: Iterator + ?Sized,     type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
        F: Future + Unpin + ?Sized,     type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W;
        fn sync(&mut self, sync: bool) -> &mut SelfⓘNotable traits for &'_ mut Iimpl<'_, I> Iterator for &'_ mut I where
        I: Iterator + ?Sized,     type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
        F: Future + Unpin + ?Sized,     type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W;
        fn fs_rights_base(&mut self, rights: u64) -> &mut SelfⓘNotable traits for &'_ mut Iimpl<'_, I> Iterator for &'_ mut I where
        I: Iterator + ?Sized,     type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
        F: Future + Unpin + ?Sized,     type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W;
        fn fs_rights_inheriting(&mut self, rights: u64) -> &mut SelfⓘNotable traits for &'_ mut Iimpl<'_, I> Iterator for &'_ mut I where
        I: Iterator + ?Sized,     type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
        F: Future + Unpin + ?Sized,     type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W;
        fn open_at<P: AsRef<Path>>(&self, file: &File, path: P) -> Result<File>;
    }

🔬 This is a nightly-only experimental API. (`wasi_ext`)
This is supported on WASI only.

WASI-specific extensions to `fs::OpenOptions`.

## Required methods

### `fn lookup_flags(&mut self, flags: u32) -> &mut Selfⓘ

### Notable traits for &'_ mut I

`impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W`
`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

Pass custom `dirflags` argument to `path_open`.

This option configures the `dirflags` argument to the `path_open` syscall which `OpenOptions` will eventually call. The `dirflags` argument configures how the file is looked up, currently primarily affecting whether symlinks are followed or not.

By default this value is `__WASI_LOOKUP_SYMLINK_FOLLOW`, or symlinks are followed. You can call this method with 0 to disable following symlinks

### `fn directory(&mut self, dir: bool) -> &mut Selfⓘ

### Notable traits for &'_ mut I

`impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W`
`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

Indicates whether `OpenOptions` must open a directory or not.

This method will configure whether the `__WASI_O_DIRECTORY` flag is passed when opening a file. When passed it will require that the opened path is a directory.

This option is by default `false`

### `fn dsync(&mut self, dsync: bool) -> &mut Selfⓘ

### Notable traits for &'_ mut I

`impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W`
`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

Indicates whether `__WASI_FDFLAG_DSYNC` is passed in the `fs_flags` field of `path_open`.

This option is by default `false`

### `fn nonblock(&mut self, nonblock: bool) -> &mut Selfⓘ

### Notable traits for &'_ mut I

`impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W`
`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

Indicates whether `__WASI_FDFLAG_NONBLOCK` is passed in the `fs_flags` field of `path_open`.

This option is by default `false`

### `fn rsync(&mut self, rsync: bool) -> &mut Selfⓘ

### Notable traits for &'_ mut I

`impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W`
`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

Indicates whether `__WASI_FDFLAG_RSYNC` is passed in the `fs_flags` field of `path_open`.

This option is by default `false`

### `fn sync(&mut self, sync: bool) -> &mut Selfⓘ

### Notable traits for &'_ mut I

`impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W`
`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

Indicates whether `__WASI_FDFLAG_SYNC` is passed in the `fs_flags` field of `path_open`.

This option is by default `false`

### `fn fs_rights_base(&mut self, rights: u64) -> &mut Selfⓘ

### Notable traits for &'_ mut I

`impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W`
`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

Indicates the value that should be passed in for the `fs_rights_base` parameter of `path_open`.

This option defaults based on the `read` and `write` configuration of this `OpenOptions` builder. If this method is called, however, the exact mask passed in will be used instead.

### `fn fs_rights_inheriting(&mut self, rights: u64) -> &mut Selfⓘ

### Notable traits for &'_ mut I

`impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W`
`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

Indicates the value that should be passed in for the `fs_rights_inheriting` parameter of `path_open`.

The default for this option is the same value as what will be passed for the `fs_rights_base` parameter but if this method is called then the specified value will be used instead.

### `fn open_at<P: AsRef<Path>>(&self, file: &File, path: P) -> Result<File>`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

Open a file or directory.

This corresponds to the `path_open` syscall.

Loading content...

## Implementors

### `impl OpenOptionsExt for OpenOptions`[src]

#### `fn lookup_flags(&mut self, flags: u32) -> &mut OpenOptions`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

#### `fn directory(&mut self, dir: bool) -> &mut OpenOptions`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

#### `fn dsync(&mut self, enabled: bool) -> &mut OpenOptions`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

#### `fn nonblock(&mut self, enabled: bool) -> &mut OpenOptions`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

#### `fn rsync(&mut self, enabled: bool) -> &mut OpenOptions`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

#### `fn sync(&mut self, enabled: bool) -> &mut OpenOptions`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

#### `fn fs_rights_base(&mut self, rights: u64) -> &mut OpenOptions`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

#### `fn fs_rights_inheriting(&mut self, rights: u64) -> &mut OpenOptions`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)

#### `fn open_at<P: AsRef<Path>>(&self, file: &File, path: P) -> Result<File>`[src]

🔬 This is a nightly-only experimental API. (`wasi_ext`)
Loading content...