pub enum FileType {
RegularFile = 32_768,
Directory = 16_384,
Symlink = 40_960,
Fifo = 4_096,
Socket = 49_152,
CharacterDevice = 8_192,
BlockDevice = 24_576,
Unknown = 24577,
}
Variants§
RegularFile = 32_768
S_IFREG
Directory = 16_384
S_IFDIR
Symlink = 40_960
S_IFLNK
Fifo = 4_096
S_IFIFO
Socket = 49_152
S_IFSOCK
CharacterDevice = 8_192
S_IFCHR
BlockDevice = 24_576
S_IFBLK
Unknown = 24577
An unknown filesystem object.
Implementations§
Source§impl FileType
impl FileType
Sourcepub const fn from_raw_mode(st_mode: RawMode) -> Self
pub const fn from_raw_mode(st_mode: RawMode) -> Self
Construct a FileType
from the S_IFMT
bits of the st_mode
field of
a Stat
.
Sourcepub const fn as_raw_mode(self) -> RawMode
pub const fn as_raw_mode(self) -> RawMode
Construct an st_mode
value from a FileType
.
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 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