pub struct Current {
pub scanned_at: Option<OffsetDateTime>,
pub artifacts: Vec<CurrentArtifact>,
pub edges: Vec<CurrentEdge>,
pub sites: Arc<SiteIndex>,
pub parents: Arc<BTreeMap<ArtifactName, Vec<ArtifactName>>>,
/* private fields */
}Expand description
The scan of one worktree.
Fields§
§scanned_at: Option<OffsetDateTime>§artifacts: Vec<CurrentArtifact>In name order.
edges: Vec<CurrentEdge>§sites: Arc<SiteIndex>Compact file lookup, shared with the visible Detail and scoped checks.
parents: Arc<BTreeMap<ArtifactName, Vec<ArtifactName>>>Reverse part links, shared across all views of the declaration shape.
Implementations§
Source§impl Current
impl Current
pub fn from_shape( artifacts: Vec<CurrentArtifact>, edges: Vec<CurrentEdge>, sites: Arc<SiteIndex>, ) -> Self
Sourcepub fn adjacent(
&self,
name: &ArtifactName,
) -> (Vec<&CurrentEdge>, Vec<&CurrentEdge>)
pub fn adjacent( &self, name: &ArtifactName, ) -> (Vec<&CurrentEdge>, Vec<&CurrentEdge>)
Relations incident to the selected Artifact, never a copy of the whole graph.
Sourcepub fn copies(&self, name: &ArtifactName) -> u32
pub fn copies(&self, name: &ArtifactName) -> u32
Count the Artifact’s copies along part paths, not by enumerating the rest of the graph.
Sourcepub fn same_shape(&self, other: &Self) -> bool
pub fn same_shape(&self, other: &Self) -> bool
Whether other has the same Artifacts, parts and edges in the same order, whatever they
would do: a view can keep where it placed them and only relight them.
Source§impl Current
impl Current
pub fn artifact(&self, name: &ArtifactName) -> Option<&CurrentArtifact>
Sourcepub fn merge_scope(&mut self, scoped: Current)
pub fn merge_scope(&mut self, scoped: Current)
Keep only checked nodes from an explicitly requested scope; other forecasts stay put.
Sourcepub fn apply_run(&mut self, run: CurrentRun) -> bool
pub fn apply_run(&mut self, run: CurrentRun) -> bool
Only the run’s requests contribute. Saved evidence never starts a content scan.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Current
impl Freeze for Currentwhere
NonZero<i32>: Freeze,
*const u8 is !null: Freeze,
PhantomData<CurrentArtifact>: Freeze,
PhantomData<CurrentEdge>: Freeze,
*const ArcInner<SiteIndex> is !null: Freeze,
PhantomData<ArcInner<SiteIndex>>: Freeze,
*const ArcInner<BTreeMap<ArtifactName, Vec<ArtifactName>>> is !null: Freeze,
PhantomData<ArcInner<BTreeMap<ArtifactName, Vec<ArtifactName>>>>: Freeze,
*const ArcInner<BTreeMap<ArtifactName, Vec<usize>>> is !null: Freeze,
PhantomData<ArcInner<BTreeMap<ArtifactName, Vec<usize>>>>: Freeze,
impl Move for Current
impl RefUnwindSafe for Current
impl Send for Current
impl Sync for Current
impl Unpin for Current
impl UnsafeUnpin for Currentwhere
NonZeroI32Inner: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<CurrentArtifact>: UnsafeUnpin,
PhantomData<CurrentEdge>: UnsafeUnpin,
*const ArcInner<SiteIndex> is !null: UnsafeUnpin,
PhantomData<ArcInner<SiteIndex>>: UnsafeUnpin,
*const ArcInner<BTreeMap<ArtifactName, Vec<ArtifactName>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<BTreeMap<ArtifactName, Vec<ArtifactName>>>>: UnsafeUnpin,
*const ArcInner<BTreeMap<ArtifactName, Vec<usize>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<BTreeMap<ArtifactName, Vec<usize>>>>: UnsafeUnpin,
impl UnwindSafe for Currentwhere
NonZero<i32>: UnwindSafe,
RawVecInner: UnwindSafe,
&'static str: UnwindSafe,
Arc<SiteIndex>: UnwindSafe,
Arc<BTreeMap<ArtifactName, Vec<ArtifactName>>>: UnwindSafe,
Arc<BTreeMap<ArtifactName, Vec<usize>>>: UnwindSafe,
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
Mutably borrows from an owned value. Read more