#[non_exhaustive]pub enum NodeKind {
Directory,
File {
size: u64,
},
Symlink,
CharDevice {
major: u32,
minor: u32,
},
BlockDevice {
major: u32,
minor: u32,
},
Fifo,
Socket,
}Expand description
What a node in a filesystem tree is, as an extraction sees it.
This is the read-side mirror of EntryKind, and it differs in one
way: there is no hard-link variant. A second name for a node is not a kind — the node
is still a file — so it is reported through TreeEntry::shared, which says which node
two names are both for.
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.
Directory
A directory.
File
A regular file.
Fields
§
size: u64The file’s length in bytes, which is how much
read_bytes will yield.
Symlink
A symbolic link, whose target is read with link_target.
CharDevice
A character-special device node.
BlockDevice
A block-special device node.
Fifo
A named pipe (FIFO).
Socket
A Unix-domain socket node.
Trait Implementations§
impl Copy for NodeKind
impl Eq for NodeKind
impl StructuralPartialEq for NodeKind
Auto Trait Implementations§
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnsafeUnpin for NodeKind
impl UnwindSafe for NodeKind
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