#[repr(u8)]pub enum Kind {
File = 0,
Directory = 1,
BlockDevice = 2,
CharacterDevice = 3,
Pipe = 4,
Socket = 5,
SymbolicLink = 6,
}
Expand description
Enumeration of file system object types.
This enum represents the different types of objects that can exist in a file system. Each variant corresponds to a specific type of file system entity with its own characteristics and behaviors.
§Examples
use file_system::Type_type;
let file_type = Type_type::File;
let dir_type = Type_type::Directory;
// Types can be compared
assert_ne!(file_type, dir_type);
// Types can be displayed
println!("Object type: {}", file_type); // Prints "Object type: File"
Variants§
File = 0
Regular file containing data
Directory = 1
Directory containing other file system objects
BlockDevice = 2
Block-oriented device (e.g., disk drives, storage devices)
CharacterDevice = 3
Character-oriented device (e.g., terminals, serial ports)
Pipe = 4
Named pipe (FIFO) for inter-process communication
Socket = 5
Unix domain socket for inter-process communication
SymbolicLink = 6
Symbolic link pointing to another file system object
Trait Implementations§
Source§impl Ord for Kind
impl Ord for Kind
Source§impl PartialOrd for Kind
impl PartialOrd for Kind
impl Copy for Kind
impl Eq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
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