Struct file_lock::FileOptions
source · [−]pub struct FileOptions { /* private fields */ }
Expand description
A wrapper around the open options type that can be queried for the write permissions
This type has the exact same API as std::fs::OpenOptions
with the exception that the confluent interface passes self
rather than &mut self
.
Implementations
sourceimpl FileOptions
impl FileOptions
pub fn new() -> Self
pub fn append(self, append: bool) -> Self
pub fn create(self, create: bool) -> Self
pub fn create_new(self, create_new: bool) -> Self
pub fn open<P: AsRef<Path>>(&self, path: P) -> Result<File>
pub fn read(self, read: bool) -> Self
pub fn truncate(self, truncate: bool) -> Self
pub fn write(self, write: bool) -> Self
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FileOptions
impl Send for FileOptions
impl Sync for FileOptions
impl Unpin for FileOptions
impl UnwindSafe for FileOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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