pub enum PathClass {
Extract,
Opaque,
Excluded,
}Expand description
How much of a path the scan may read — the three states, most permissive first.
Ordered by how much each admits, so the Extract → Opaque → Excluded
progression reads as a narrowing. See the module docs for which decision
needs which.
§Deliberately closed, and not #[non_exhaustive]
The attribute would push a downstream matcher onto a _ => wildcard arm,
which is the precise thing this type exists to prevent. Every reader of
repository bytes asks PathClass::mines or PathClass::reads; a fourth
class is a claim that some reader should treat some path a fourth way, and
every such reader has to reconsider when one arrives. A wildcard arm is
how that reconsideration gets skipped silently — the same argument
rto_exec’s Gate is closed on, where folding NotRun into a wildcard is
the defect its third state exists to catch.
The set is three because the fourth candidate is already taken: in the
graph, mined, but muted from the reports is [debt] ignore, and reproducing
it here is what issue #840 was raised against. Adding a variant is breaking
for this published crate, and under AGENTS.md’s rto-* carve-out that
ships as a minor — so the cost of getting it wrong later is a compile error
at every call site, which is exactly the price this type wants paid.
Variants§
Extract
Extract normally: every extractor, every miner, content capture, markers. The default for every path a policy does not name.
Opaque
A file node and nothing else — identity without content. No
config-key mining, no symbols, no image/audio facts, no marker scan, no
meta.content, and the authored classifier declines it.
Excluded
Not in the graph at all. No node is produced and the bytes are never read, so nothing a screen would have caught can reach the store by this route either.
Implementations§
Source§impl PathClass
impl PathClass
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The class’s name, as roteiro config and a node’s meta.scan spell it.
Sourcepub const fn mines(self) -> bool
pub const fn mines(self) -> bool
Whether a reader may derive anything beyond a file’s identity from this path: config keys, symbols, markers, annotations, content.
The question every miner asks. It is deliberately not == Extract
spelled out at each call site: a fourth class added later must make every
miner reconsider, and a named predicate is where that reconsideration
lands.
Sourcepub const fn reads(self) -> bool
pub const fn reads(self) -> bool
Whether the bytes at this path are read at all.
false only for PathClass::Excluded. An PathClass::Opaque path
is read — its length and line count are facts about it — but nothing is
derived from what the bytes say.
Trait Implementations§
impl Copy for PathClass
impl Eq for PathClass
impl StructuralPartialEq for PathClass
Auto Trait Implementations§
impl Freeze for PathClass
impl RefUnwindSafe for PathClass
impl Send for PathClass
impl Sync for PathClass
impl Unpin for PathClass
impl UnsafeUnpin for PathClass
impl UnwindSafe for PathClass
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.