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
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§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
)