pub enum Claim {
Rule(RuleClaim),
Ignored(IgnoredClaim),
IgnoredFile(IgnoredFileClaim),
WorkTree,
}Expand description
Why something is reclaimable, and what is known about it.
Three variants rather than two because a file is genuinely a third thing rather than a directory with a smaller number on it: it has no subtree, so prune-on-match does not apply to it, the size floor does not apply to it, and it is never unpriced. Spelled as a variant so that every consumer is made to say what it does about one — the enum being exhaustive is what found the places that had quietly assumed a claim was a directory.
Variants§
Rule(RuleClaim)
Tier one: a marker-anchored rule recognised the project and named this directory as its output.
Ignored(IgnoredClaim)
Tier two: nothing in the ruleset knows this directory, but git does.
IgnoredFile(IgnoredFileClaim)
Tier two, on a leaf: a gitignored file.
WorkTree
A linked git work tree that has been left alone and holds nothing uncommitted.
Neither tier could ever have produced this. Tier one is marker-anchored and claims a directory’s children, and a work tree is not an artefact of a project — it is a place somebody was working. Tier two refuses anything holding a checkout, and rightly.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Claim
impl RefUnwindSafe for Claim
impl Send for Claim
impl Sync for Claim
impl Unpin for Claim
impl UnsafeUnpin for Claim
impl UnwindSafe for Claim
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<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