pub struct OpenOptions {
read: bool,
write: bool,
append: bool,
truncate: bool,
create: bool,
create_new: bool,
custom_flags: i32,
mode: mode_t,
}
Fields§
§read: bool
§write: bool
§append: bool
§truncate: bool
§create: bool
§create_new: bool
§custom_flags: i32
§mode: mode_t
Implementations§
Source§impl OpenOptions
impl OpenOptions
pub fn new() -> OpenOptions
pub fn read(&mut self, read: bool)
pub fn write(&mut self, write: bool)
pub fn append(&mut self, append: bool)
pub fn truncate(&mut self, truncate: bool)
pub fn create(&mut self, create: bool)
pub fn create_new(&mut self, create_new: bool)
pub fn custom_flags(&mut self, flags: i32)
pub fn mode(&mut self, mode: u32)
fn get_access_mode(&self) -> Result<c_int>
fn get_creation_mode(&self) -> Result<c_int>
Trait Implementations§
Source§impl AsInner<OpenOptions> for OpenOptions
impl AsInner<OpenOptions> for OpenOptions
fn as_inner(&self) -> &OpenOptions
Source§impl AsInnerMut<OpenOptions> for OpenOptions
impl AsInnerMut<OpenOptions> for OpenOptions
fn as_inner_mut(&mut self) -> &mut OpenOptions
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§fn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for OpenOptions
impl RefUnwindSafe for OpenOptions
impl Send for OpenOptions
impl Sync for OpenOptions
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)The largest safe length for a
[Self]
. Read more