Struct advent_of_code_2022::day_7::Directory
source · struct Directory {
name: String,
sub_dirs: Vec<Directory>,
files: Vec<File>,
}
Expand description
Represent a directory in a file system
Fields§
§name: String
§sub_dirs: Vec<Directory>
§files: Vec<File>
Implementations§
source§impl Directory
impl Directory
sourcefn dir_sizes(&self) -> Vec<usize>
fn dir_sizes(&self) -> Vec<usize>
Recursively a list of directory sizes in the tree below and including this directory.
Note that inner directories will be included in their own list entry and as part of the total in each of their ancestors. The last item in the returned list will be the total size of the directory this was called on.
Trait Implementations§
source§impl PartialEq<Directory> for Directory
impl PartialEq<Directory> for Directory
impl Eq for Directory
impl StructuralEq for Directory
impl StructuralPartialEq for Directory
Auto Trait Implementations§
impl RefUnwindSafe for Directory
impl Send for Directory
impl Sync for Directory
impl Unpin for Directory
impl UnwindSafe for Directory
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