pub struct Node {
pub name: OsString,
pub path: PathBuf,
pub parent: Option<NodeId>,
pub reclaimable: u64,
pub unmeasured: usize,
pub claims: usize,
pub modified: Option<SystemTime>,
pub hit: Option<Hit>,
pub children: Vec<NodeId>,
/* private fields */
}Expand description
One directory on a path to something reclaimable.
Fields§
§name: OsStringThe final path component. The root node carries the whole scan root instead.
path: PathBufThe full path.
parent: Option<NodeId>The directory this one is in, and None for the root.
Carried rather than derived, because everything the front end does to a row is a statement about its ancestry: a mark covers a subtree, so “is this row marked” is a walk upwards, and so is putting a cursor back on the nearest surviving ancestor of a row the deleter has just taken away. Ten steps at this tree’s real depth.
reclaimable: u64Measured reclaimable bytes in this subtree, this node included.
unmeasured: usizeHow many claims in this subtree were recorded but not measured, because the scan
pruned at them. A node with reclaimable == 0 and unmeasured > 0 is not empty; it
is unpriced, and a breakdown is what puts a number on it.
claims: usizeHow many claims are in this subtree, priced or not.
The count a selection is stated in. Bytes alone cannot be, while a default scan prices 8% of what it finds: “41.2 GiB marked” over a tree that is mostly unpriced reads as a small selection, and “120 directories” is the part that is always true.
modified: Option<SystemTime>The newest mtime anywhere in this subtree, which is what the age column reports.
The newest rather than the oldest, because the question a row answers is “has anything under here been touched lately” — one file rebuilt this morning is what makes a subtree still in use, and an average or an oldest would hide it behind everything beside it that is stale.
hit: Option<Hit>Set when this node is itself a claimed directory, in which case it has no children.
children: Vec<NodeId>Children, in insertion order until Tree::sort_by is called.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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
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> ⓘ
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> ⓘ
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