pub struct OpenOptions(/* private fields */);Expand description
How to open a file: the options of std’s OpenOptions, opened on the
blocking pool into a Handle.
Implementations§
Source§impl OpenOptions
impl OpenOptions
Sourcepub fn append(&mut self, append: bool) -> &mut Self
pub fn append(&mut self, append: bool) -> &mut Self
Opens for writing at the end, whatever the cursor.
Sourcepub fn truncate(&mut self, truncate: bool) -> &mut Self
pub fn truncate(&mut self, truncate: bool) -> &mut Self
Cuts an existing file down to nothing when it opens.
Sourcepub fn create_new(&mut self, create_new: bool) -> &mut Self
pub fn create_new(&mut self, create_new: bool) -> &mut Self
Creates the file, failing if it exists.
Sourcepub fn mode(&mut self, mode: u32) -> &mut Self
pub fn mode(&mut self, mode: u32) -> &mut Self
The mode bits a created file gets (before the umask).
Sourcepub fn custom_flags(&mut self, flags: i32) -> &mut Self
pub fn custom_flags(&mut self, flags: i32) -> &mut Self
Flags passed to open beside the ones the options set.
Trait Implementations§
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§fn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenOptions
impl Debug for OpenOptions
Source§impl Default for OpenOptions
impl Default for OpenOptions
Source§impl From<OpenOptions> for OpenOptions
impl From<OpenOptions> for OpenOptions
Source§fn from(options: OpenOptions) -> Self
fn from(options: OpenOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OpenOptions
impl RefUnwindSafe for OpenOptions
impl Send for OpenOptions
impl Sync for OpenOptions
impl Unpin for OpenOptions
impl UnsafeUnpin for OpenOptions
impl UnwindSafe for OpenOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more