pub struct Tree {
pub path: PathBuf,
pub content: Option<Vec<u8>>,
pub children: Option<Vec<Tree>>,
}Expand description
Here are two file types in Tree
- Dir - no contents, have children
- File - have contents, no children
Fields§
§path: PathBufFile path
content: Option<Vec<u8>>File content
children: Option<Vec<Tree>>Children files
Implementations§
Trait Implementations§
source§impl PartialEq for Tree
impl PartialEq for Tree
impl Eq for Tree
impl StructuralEq for Tree
impl StructuralPartialEq for Tree
Auto Trait Implementations§
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnwindSafe for Tree
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