pub struct ChangeScope { /* private fields */ }Expand description
Engine-owned change scope of one run: a global changed-file set or the
per-workspace Git baselines of workspaces.changedSince.
The resolved change scope of one run.
Implementations§
Source§impl ChangeScope
impl ChangeScope
Sourcepub fn resolve(
request: ChangeScopeRequest<'_>,
config: &ResolvedConfig,
workspaces: &[WorkspaceInfo],
) -> Result<ChangeScope, PackageBaselineError>
pub fn resolve( request: ChangeScopeRequest<'_>, config: &ResolvedConfig, workspaces: &[WorkspaceInfo], ) -> Result<ChangeScope, PackageBaselineError>
Resolve the change scope of a run.
A changed-file set wins. A requested global ref without files, or a caller-owned scope, gives the full scope. Otherwise the configured package baselines apply, when the config has any. A mapped ref that Git cannot resolve stands the map down to the full scope.
§Errors
Returns an error when the package map has a malformed key or Git ref, or when a workspace root cannot be read.
Sourcepub fn changed_files(files: &HashSet<PathBuf, FxBuildHasher>) -> ChangeScope
pub fn changed_files(files: &HashSet<PathBuf, FxBuildHasher>) -> ChangeScope
The scope of one global changed-file set.
Sourcepub const fn scope_reason(&self) -> Option<ScopeReason>
pub const fn scope_reason(&self) -> Option<ScopeReason>
The scope_reasons channel that narrowed the run, when a change ref
did: the package map, or a global ref. The saved-baseline comparison of
check and finding-id queries read this: a finding outside the scope
is hidden, not gone. dupes compares its baseline with the report
before the package map narrows it, so it reads only the global ref.
Sourcepub const fn packages(&self) -> Option<&PackageChangeScope>
pub const fn packages(&self) -> Option<&PackageChangeScope>
The applied package baselines, when the configured map scopes the run.
Sourcepub const fn request_outcome(&self) -> Option<&RequestOutcome>
pub const fn request_outcome(&self) -> Option<&RequestOutcome>
The package-baselines request outcome, when the run read the map.
Sourcepub fn stand_down_message(&self) -> Option<&str>
pub fn stand_down_message(&self) -> Option<&str>
The sentence to show when the package map stood down, or None when
the map applied or the run did not read it.
Sourcepub fn package_baselines(&self) -> Vec<PackageBaselineStatus>
pub fn package_baselines(&self) -> Vec<PackageBaselineStatus>
The package_baselines provenance rows of the run. Empty unless the
configured map scopes the run.
Trait Implementations§
Source§impl Clone for ChangeScope
impl Clone for ChangeScope
Source§fn clone(&self) -> ChangeScope
fn clone(&self) -> ChangeScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChangeScope
impl Debug for ChangeScope
Source§impl Default for ChangeScope
impl Default for ChangeScope
Source§fn default() -> ChangeScope
fn default() -> ChangeScope
Auto Trait Implementations§
impl Freeze for ChangeScope
impl RefUnwindSafe for ChangeScope
impl Send for ChangeScope
impl Sync for ChangeScope
impl Unpin for ChangeScope
impl UnsafeUnpin for ChangeScope
impl UnwindSafe for ChangeScope
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> 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> ⓘ
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