Enum openat::SimpleType
source · pub enum SimpleType {
Symlink,
Dir,
File,
Other,
}
Expand description
This is a simplified file type enum that is easy to match
It doesn’t represent all the options, because that enum needs to extensible but most application do not actually need that power, so we provide this simplified enum that works for many appalications.
Variants§
Symlink
Entry is a symlink
Dir
Entry is a directory
File
Entry is a regular file
Other
Entry is neither a symlink, directory nor a regular file
Implementations§
source§impl SimpleType
impl SimpleType
sourcepub fn extract(stat: &Metadata) -> SimpleType
pub fn extract(stat: &Metadata) -> SimpleType
Find out a simple type from a file Metadata (stat)
Trait Implementations§
source§impl Clone for SimpleType
impl Clone for SimpleType
source§fn clone(&self) -> SimpleType
fn clone(&self) -> SimpleType
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 moresource§impl Debug for SimpleType
impl Debug for SimpleType
source§impl PartialEq for SimpleType
impl PartialEq for SimpleType
source§fn eq(&self, other: &SimpleType) -> bool
fn eq(&self, other: &SimpleType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SimpleType
impl Eq for SimpleType
impl StructuralPartialEq for SimpleType
Auto Trait Implementations§
impl Freeze for SimpleType
impl RefUnwindSafe for SimpleType
impl Send for SimpleType
impl Sync for SimpleType
impl Unpin for SimpleType
impl UnwindSafe for SimpleType
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)