pub struct GcRootSet {
pub roots: Vec<GcRoot>,
pub rejected: Vec<GcRootRejection>,
}Expand description
The validated, de-duplicated root set for one rch gc run.
Fields§
§roots: Vec<GcRoot>Roots to scan, in a stable order: pooled remote base, pooled store
base, configured extras, --root flags, then the worker temp base.
rejected: Vec<GcRootRejection>Roots that failed validation and will NOT be scanned.
Implementations§
Source§impl GcRootSet
impl GcRootSet
Sourcepub fn scan_bases(&self) -> Vec<String>
pub fn scan_bases(&self) -> Vec<String>
The client-resolvable roots, i.e. every root except the worker temp
base. These are the paths handed to the remote enumeration/sweep
scripts as $base.
Sourcepub fn attribute<'a>(&'a self, path: &str) -> Option<&'a GcRoot>
pub fn attribute<'a>(&'a self, path: &str) -> Option<&'a GcRoot>
Look up which configured root a discovered absolute path belongs to.
Attribution is longest-prefix so a store_base nested inside
remote_base still wins, and it is path-segment aware so
/data/projects-old/x is never attributed to /data/projects.
Returns None for a path under no configured root — in practice a dir
found under the worker-resolved temp base.
NOTE: this matches the CONFIGURED spelling of each root. The remote
scripts canonicalize their root with pwd -P and report it back
(stale_target_reap::parse_scan_roots), so a caller holding those
resolved paths — rch gc does — must match against them with
path_is_under instead; a symlinked remote_base matches nothing
here.
Trait Implementations§
impl Eq for GcRootSet
impl StructuralPartialEq for GcRootSet
Auto Trait Implementations§
impl Freeze for GcRootSet
impl RefUnwindSafe for GcRootSet
impl Send for GcRootSet
impl Sync for GcRootSet
impl Unpin for GcRootSet
impl UnsafeUnpin for GcRootSet
impl UnwindSafe for GcRootSet
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.