pub struct BaselineScopeReasons(/* private fields */);Expand description
The set of channels that narrowed one run.
A bitset rather than a Vec so BaselineStaleness keeps Copy, which
the gate builder’s const fn and three envelope structs that hold the
object by value rely on. Serializes as an array of ScopeReason in
declaration order, so two identical runs produce identical bytes.
Implementations§
Source§impl BaselineScopeReasons
impl BaselineScopeReasons
Sourcepub const fn with(self, reason: ScopeReason) -> Self
pub const fn with(self, reason: ScopeReason) -> Self
This set plus reason.
Sourcepub const fn insert_if(self, active: bool, reason: ScopeReason) -> Self
pub const fn insert_if(self, active: bool, reason: ScopeReason) -> Self
This set plus reason when active, unchanged otherwise.
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
True when nothing narrowed the run, which is exactly when
change_scoped is false.
Sourcepub const fn contains(self, reason: ScopeReason) -> bool
pub const fn contains(self, reason: ScopeReason) -> bool
Whether reason narrowed the run.
Sourcepub fn iter(self) -> impl Iterator<Item = ScopeReason>
pub fn iter(self) -> impl Iterator<Item = ScopeReason>
The reasons in wire order.
Sourcepub fn all_removable_by_rerun(self) -> bool
pub fn all_removable_by_rerun(self) -> bool
True when repeating the run without every channel in this set judges the same project, so a command that drops them all is worth suggesting.
Vacuously true for an empty set; callers that mean “this run was
narrowed and can be widened” check Self::is_empty first.
Trait Implementations§
Source§impl Clone for BaselineScopeReasons
impl Clone for BaselineScopeReasons
impl Copy for BaselineScopeReasons
Source§impl Debug for BaselineScopeReasons
impl Debug for BaselineScopeReasons
Source§impl Default for BaselineScopeReasons
impl Default for BaselineScopeReasons
Source§impl<'de> Deserialize<'de> for BaselineScopeReasons
impl<'de> Deserialize<'de> for BaselineScopeReasons
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq for BaselineScopeReasons
Source§impl PartialEq for BaselineScopeReasons
impl PartialEq for BaselineScopeReasons
Source§impl Serialize for BaselineScopeReasons
impl Serialize for BaselineScopeReasons
impl StructuralPartialEq for BaselineScopeReasons
Auto Trait Implementations§
impl Freeze for BaselineScopeReasons
impl RefUnwindSafe for BaselineScopeReasons
impl Send for BaselineScopeReasons
impl Sync for BaselineScopeReasons
impl Unpin for BaselineScopeReasons
impl UnsafeUnpin for BaselineScopeReasons
impl UnwindSafe for BaselineScopeReasons
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.