#[non_exhaustive]pub enum Type {
File,
Dir,
Symlink,
Socket,
Fifo,
BlockDevice,
CharDevice,
Whiteout,
Unknown,
}
Expand description
The different types of files known to this library
Can be constructed From<u32>
.
assert_eq!(unix_mode::Type::from(0o0100640), unix_mode::Type::File);
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.
File
A plain file.
Dir
A directory.
Symlink
A symbolic link.
Socket
A Unix-domain socket.
Fifo
A named pipe / FIFO.
BlockDevice
A block device, such as a disk.
CharDevice
A character device, such as a /dev/null
.
Whiteout
A removed file in union filesystems.
Unknown
File type not recognized by this version of this library
More types might be added in the future, so the semantics of this variant may change.
Trait Implementations§
source§impl PartialEq<Type> for Type
impl PartialEq<Type> for Type
impl Copy for Type
impl Eq for Type
impl StructuralEq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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