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,
}
Available on crate feature
fs
only.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 2 bytes
Size for each variant:
RegularFile
: 0 bytesDirectory
: 0 bytesSymlink
: 0 bytesFifo
: 0 bytesSocket
: 0 bytesCharacterDevice
: 0 bytesBlockDevice
: 0 bytesUnknown
: 0 bytes