Struct fs_err::tokio::OpenOptions
source · [−]pub struct OpenOptions { /* private fields */ }Available on crate feature
tokio only.Expand description
Options and flags which can be used to configure how a file is opened.
This is a wrapper around tokio::fs::OpenOptions.
Implementations
sourceimpl OpenOptions
impl OpenOptions
sourcepub fn new() -> OpenOptions
pub fn new() -> OpenOptions
Creates a blank new set of options ready for configuration.
All options are initially set to false.
This is a wrapped version of tokio::fs::OpenOptions::new
Examples
use fs_err::tokio::OpenOptions;
let mut options = OpenOptions::new();
let future = options.read(true).open("foo.txt");sourcepub fn read(&mut self, read: bool) -> &mut OpenOptions
pub fn read(&mut self, read: bool) -> &mut OpenOptions
Wrapper for tokio::fs::OpenOptions::read.
sourcepub fn write(&mut self, write: bool) -> &mut OpenOptions
pub fn write(&mut self, write: bool) -> &mut OpenOptions
Wrapper for tokio::fs::OpenOptions::write.
sourcepub fn append(&mut self, append: bool) -> &mut OpenOptions
pub fn append(&mut self, append: bool) -> &mut OpenOptions
Wrapper for tokio::fs::OpenOptions::append.
sourcepub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions
pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions
Wrapper for tokio::fs::OpenOptions::truncate.
sourcepub fn create(&mut self, create: bool) -> &mut OpenOptions
pub fn create(&mut self, create: bool) -> &mut OpenOptions
Wrapper for tokio::fs::OpenOptions::create.
sourcepub fn create_new(&mut self, create_new: bool) -> &mut OpenOptions
pub fn create_new(&mut self, create_new: bool) -> &mut OpenOptions
Wrapper for tokio::fs::OpenOptions::create_new.
sourceimpl OpenOptions
impl OpenOptions
sourcepub fn mode(&mut self, mode: u32) -> &mut OpenOptions
pub fn mode(&mut self, mode: u32) -> &mut OpenOptions
Wrapper for tokio::fs::OpenOptions::mode.
sourcepub fn custom_flags(&mut self, flags: i32) -> &mut OpenOptions
pub fn custom_flags(&mut self, flags: i32) -> &mut OpenOptions
Wrapper for tokio::fs::OpenOptions::custom_flags.
Trait Implementations
sourceimpl Clone for OpenOptions
impl Clone for OpenOptions
sourcefn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for OpenOptions
impl Debug for OpenOptions
sourceimpl Default for OpenOptions
impl Default for OpenOptions
sourcefn default() -> OpenOptions
fn default() -> OpenOptions
Returns the “default value” for a type. Read more
sourceimpl From<OpenOptions> for OpenOptions
impl From<OpenOptions> for OpenOptions
sourcefn from(std: OpenOptions) -> Self
fn from(std: OpenOptions) -> Self
Converts to this type from the input type.
sourceimpl From<OpenOptions> for OpenOptions
impl From<OpenOptions> for OpenOptions
sourcefn from(tokio: TokioOpenOptions) -> Self
fn from(tokio: TokioOpenOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for OpenOptions
impl Send for OpenOptions
impl Sync for OpenOptions
impl Unpin for OpenOptions
impl UnwindSafe for OpenOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more