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
sourceimpl 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
sourceimpl Clone for SimpleType
impl Clone for SimpleType
sourcefn clone(&self) -> SimpleType
fn clone(&self) -> SimpleType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SimpleType
impl Debug for SimpleType
sourceimpl PartialEq<SimpleType> for SimpleType
impl PartialEq<SimpleType> for SimpleType
impl Copy for SimpleType
impl Eq for SimpleType
impl StructuralEq for SimpleType
impl StructuralPartialEq for SimpleType
Auto Trait Implementations
impl RefUnwindSafe for SimpleType
impl Send for SimpleType
impl Sync for SimpleType
impl Unpin for SimpleType
impl UnwindSafe for SimpleType
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more