pub struct PackageChangeScope { /* private fields */ }Expand description
Engine-owned per-workspace Git baseline state used by analysis surfaces. Resolved package baselines for one analysis project.
A file belongs to its nearest discovered workspace root. Workspaces with no authored baseline and files outside workspace roots remain in full scope.
Implementations§
Source§impl PackageChangeScope
impl PackageChangeScope
Sourcepub fn project_root(&self) -> &Path
pub fn project_root(&self) -> &Path
Canonical analysis root used by this package scope.
Sourcepub fn covers(&self, path: &Path) -> bool
pub fn covers(&self, path: &Path) -> bool
Whether this scope owns a project path, including root-level files.
Sourcepub fn configured_baselines(&self) -> impl Iterator<Item = (&str, &str)>
pub fn configured_baselines(&self) -> impl Iterator<Item = (&str, &str)>
Authored workspace keys and their refs. A key is project-relative and uses the path that discovery reports, also for a symlinked workspace.
Sourcepub fn baseline_for(&self, path: &Path) -> Option<&str>
pub fn baseline_for(&self, path: &Path) -> Option<&str>
Effective Git ref for a file, or None in a full-scope workspace.
Trait Implementations§
Source§impl Clone for PackageChangeScope
impl Clone for PackageChangeScope
Source§fn clone(&self) -> PackageChangeScope
fn clone(&self) -> PackageChangeScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PackageChangeScope
impl RefUnwindSafe for PackageChangeScope
impl Send for PackageChangeScope
impl Sync for PackageChangeScope
impl Unpin for PackageChangeScope
impl UnsafeUnpin for PackageChangeScope
impl UnwindSafe for PackageChangeScope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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