pub enum SizeMode {
Skip,
Breakdown,
BreakdownUnder(PathBuf),
}Expand description
How much work a scan may do to size what it claims.
Variants§
Skip
Record claims without enumerating them. The default, and the performance thesis.
Breakdown
Sum each claim’s subtree. What “show me a breakdown” costs — an order of magnitude over
the scan it prices (4.6 s to 55.8 s over one real ~/repos), which is why nothing does
it unasked.
BreakdownUnder(PathBuf)
Sum the subtree of every claim the named path touches, and nothing else.
The whole-tree breakdown is the only honest answer to “how much do I get back from all
of this”, and it is also the one nobody wants to wait for twice. Scoping it is what
makes the number reachable at a price the user chooses: pay for the one subtree in
question and leave the rest reading Unmeasured, which it already was.
It is also what --breakdown-under hands the tree: a reader who wants one subtree
priced and the rest left alone gets exactly that, and every other row keeps its dash.
The scope has to be spelled the way the walk spells its hits — the scan root’s own
prefix and all — because the comparison is by path. Anchoring it is the caller’s job;
see the command line’s anchor.
Trait Implementations§
impl Eq for SizeMode
impl StructuralPartialEq for SizeMode
Auto Trait Implementations§
impl Freeze for SizeMode
impl RefUnwindSafe for SizeMode
impl Send for SizeMode
impl Sync for SizeMode
impl Unpin for SizeMode
impl UnsafeUnpin for SizeMode
impl UnwindSafe for SizeMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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