pub struct FileEntry {
pub name: String,
pub kind: FileEntryKind,
pub size: u64,
pub children: Vec<FileEntry>,
}Expand description
A single entry in a file tree — either a file or a directory.
Nested fields within a FileEntry:
┌──────────┬───────────┬──────────┬─────────────────────────────┐
│ Field ID │ Wire Type │ Name │ Description │
├──────────┼───────────┼──────────┼─────────────────────────────┤
│ 1 │ Bytes │ name │ Entry name (not full path) │
│ 2 │ Varint │ kind │ 0=file, 1=directory │
│ 3 │ Varint │ size │ File size in bytes │
│ 4 │ Nested │ children │ Repeated FileEntry (dirs) │
└──────────┴───────────┴──────────┴─────────────────────────────┘The children field is recursive: a directory entry contains nested
FileEntry values, each encoded as a nested TLV sub-message.
Fields§
§name: String§kind: FileEntryKind§size: u64§children: Vec<FileEntry>Trait Implementations§
impl Eq for FileEntry
impl StructuralPartialEq for FileEntry
Auto Trait Implementations§
impl Freeze for FileEntry
impl RefUnwindSafe for FileEntry
impl Send for FileEntry
impl Sync for FileEntry
impl Unpin for FileEntry
impl UnsafeUnpin for FileEntry
impl UnwindSafe for FileEntry
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