pub struct OpenOp<'a> { /* private fields */ }Expand description
One complete open request. This replaces three error-prone parallel slices of paths, flags, and modes.
Implementations§
Source§impl<'a> OpenOp<'a>
impl<'a> OpenOp<'a>
pub fn path(&self) -> &Path
Sourcepub fn into_path(self) -> PathBuf
pub fn into_path(self) -> PathBuf
Extract an owned path. Borrowed paths are copied; owned storage is moved.
Sourcepub fn into_owned(self) -> OpenOp<'static>
pub fn into_owned(self) -> OpenOp<'static>
Retain this request independently of the source pathname. An already-owned request transfers its allocation without copying.
pub const fn flags(&self) -> OpenFlags
Sourcepub const fn creation_mode(&self) -> u32
pub const fn creation_mode(&self) -> u32
Requested creation permissions, before applying the backend’s umask.
Sourcepub fn new<P>(path: &'a P, flags: OpenFlags) -> OpenOp<'a>
pub fn new<P>(path: &'a P, flags: OpenFlags) -> OpenOp<'a>
Borrow a pathname without allocating. Use into_owned() for a stored plan that must outlive its source paths.
pub fn mode(self, mode: u32) -> OpenOp<'a>
Trait Implementations§
impl<'a> Eq for OpenOp<'a>
impl<'a> StructuralPartialEq for OpenOp<'a>
Auto Trait Implementations§
impl<'a> Freeze for OpenOp<'a>
impl<'a> RefUnwindSafe for OpenOp<'a>
impl<'a> Send for OpenOp<'a>
impl<'a> Sync for OpenOp<'a>
impl<'a> Unpin for OpenOp<'a>
impl<'a> UnsafeUnpin for OpenOp<'a>
impl<'a> UnwindSafe for OpenOp<'a>
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