pub struct DiskItem {
pub name: String,
pub disk_size: u64,
pub children: Option<Vec<DiskItem>>,
}Fields§
§name: String§disk_size: u64§children: Option<Vec<DiskItem>>Implementations§
Source§impl DiskItem
impl DiskItem
pub fn from_analyze( path: &Path, apparent: bool, root_dev: u64, ) -> Result<Self, Box<dyn Error>>
Sourcepub fn from_shallow_scan(
path: &Path,
apparent: bool,
root_dev: u64,
) -> Result<Self, Box<dyn Error>>
pub fn from_shallow_scan( path: &Path, apparent: bool, root_dev: u64, ) -> Result<Self, Box<dyn Error>>
Build a fully-recursive DiskItem tree for path.
Despite the historical name, this is not a shallow scan: it performs a
complete recursive analysis of the entire subtree, identical to
DiskItem::from_analyze. The separate entry point is kept only so the
TUI’s do_shallow_scan call site reads naturally. New code should call
DiskItem::from_analyze directly.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiskItem
impl RefUnwindSafe for DiskItem
impl Send for DiskItem
impl Sync for DiskItem
impl Unpin for DiskItem
impl UnsafeUnpin for DiskItem
impl UnwindSafe for DiskItem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more