#[non_exhaustive]pub enum VfDir {
Descriptor {
fd: i32,
owner: u64,
},
Path(PathBuf),
}Expand description
An opaque handle to an open directory.
It exists so recursive removal can be rooted at an already-resolved
directory instead of a path. Path-based entry points re-resolve the path and
are therefore subject to the classic entry-point TOCTOU race: a concurrent
actor can replace a path component with a symlink between the caller naming
the path and the removal starting. A handle removes that race for the root
of the removal (the same guarantee remove_dir_all’s RemoveDir trait
gives). Backends without directory handles return VfDir::Path, which
carries no such guarantee.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Descriptor
A backend-assigned directory handle, bound to the client that opened it.
Path(PathBuf)
A backend without directory handles; the removal re-resolves this path.
Trait Implementations§
impl Eq for VfDir
impl StructuralPartialEq for VfDir
Auto Trait Implementations§
impl Freeze for VfDir
impl RefUnwindSafe for VfDir
impl Send for VfDir
impl Sync for VfDir
impl Unpin for VfDir
impl UnsafeUnpin for VfDir
impl UnwindSafe for VfDir
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