FileOptionsExt

Trait FileOptionsExt 

Source
pub trait FileOptionsExt: Into<FileOptions> {
    // Required methods
    fn new() -> Self;
    fn read(self, read: bool) -> Self;
    fn read_data(self, read: bool) -> Self;
    fn write(self, write: bool) -> Self;
    fn append(self, append: bool) -> Self;
    fn is_empty(&self) -> bool;
    fn is_read(&self) -> bool;
    fn is_read_data(&self) -> bool;
    fn is_write(&self) -> bool;
    fn is_append(&self) -> bool;
    fn is_read_any(&self) -> bool;
    fn is_write_any(&self) -> bool;
}
Expand description

Extension for sys::ffi::FileOptions make it looks like [std::fs::OpenOptions].

Required Methods§

Source

fn new() -> Self

Creates new empty file options.

Source

fn read(self, read: bool) -> Self

Source

fn read_data(self, read: bool) -> Self

Source

fn write(self, write: bool) -> Self

Source

fn append(self, append: bool) -> Self

Source

fn is_empty(&self) -> bool

Source

fn is_read(&self) -> bool

Source

fn is_read_data(&self) -> bool

Source

fn is_write(&self) -> bool

Source

fn is_append(&self) -> bool

Source

fn is_read_any(&self) -> bool

Source

fn is_write_any(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§