#[non_exhaustive]pub enum FileType {
Fifo,
CharDevice,
Directory,
BlockDevice,
Regular,
Symlink,
Socket,
Whiteout,
Other(u16),
}Expand description
The file type decoded from di_mode & IFMT.
#[non_exhaustive] so a later phase can add a variant (or the Other
classification changes) without a breaking change; consumers matching this
enum use a _ arm.
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.
Fifo
Named pipe / FIFO (IFIFO, 0o010000).
CharDevice
Character device (IFCHR, 0o020000).
Directory
Directory (IFDIR, 0o040000).
BlockDevice
Block device (IFBLK, 0o060000).
Regular
Regular file (IFREG, 0o100000).
Symlink
Symbolic link (IFLNK, 0o120000).
Socket
UNIX-domain socket (IFSOCK, 0o140000).
Whiteout
Whiteout (IFWHT, 0o160000).
Other(u16)
An IFMT value not defined by the format — carries the raw type nibble
so an unknown type is reported with its evidence, never hidden.
Implementations§
Trait Implementations§
impl Copy for FileType
impl Eq for FileType
impl StructuralPartialEq for FileType
Auto Trait Implementations§
impl Freeze for FileType
impl RefUnwindSafe for FileType
impl Send for FileType
impl Sync for FileType
impl Unpin for FileType
impl UnsafeUnpin for FileType
impl UnwindSafe for FileType
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