Struct OpenOptions
pub struct OpenOptions { pub(in ::sys::fs::unix) read: bool, pub(in ::sys::fs::unix) write: bool, pub(in ::sys::fs::unix) append: bool, pub(in ::sys::fs::unix) truncate: bool, pub(in ::sys::fs::unix) create: bool, pub(in ::sys::fs::unix) create_new: bool, pub(in ::sys::fs::unix) custom_flags: i32, pub(in ::sys::fs::unix) mode: mode_t }
Fields
read: boolwrite: boolappend: booltruncate: boolcreate: boolcreate_new: boolcustom_flags: i32mode: mode_t
Implementations
impl OpenOptions
fn new() -> OpenOptionsfn read(&mut self, read: bool)fn write(&mut self, write: bool)fn append(&mut self, append: bool)fn truncate(&mut self, truncate: bool)fn create(&mut self, create: bool)fn create_new(&mut self, create_new: bool)fn custom_flags(&mut self, flags: i32)fn mode(&mut self, mode: u32)fn get_access_mode(&self) -> Result<c_int>fn get_creation_mode(&self) -> Result<c_int>
Trait Implementations
impl Clone for OpenOptions
fn clone(&self) -> OpenOptions
impl Debug for OpenOptions
fn fmt(&self, f: &mut Formatter<'_>) -> Result
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
impl<T> Any for OpenOptions
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for OpenOptions
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for OpenOptions
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for OpenOptions
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for OpenOptions
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for OpenOptions
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for OpenOptions
impl<T> ToOwned for OpenOptions
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for OpenOptions
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for OpenOptions
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for OpenOptions
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>