pub enum SuppressionScope {
All,
Some(BTreeSet<Metric>),
}Expand description
Which metrics a suppression marker covers.
All means the marker omits an explicit metric list and therefore
silences every threshold for the enclosing scope. Some carries
the explicit list parsed from bca: suppress(a, b, c); an empty set
means the marker effectively suppresses nothing (only possible via
an empty () list, which is treated as a no-op rather than an
error).
Variants§
Implementations§
Source§impl SuppressionScope
impl SuppressionScope
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
True when the scope suppresses nothing — used by serde to elide the field from JSON output when no markers fired.
Sourcepub fn merge(&mut self, other: &SuppressionScope)
pub fn merge(&mut self, other: &SuppressionScope)
Merge other into self. All absorbs everything; otherwise
the two sets union. Used when multiple markers stack on the
same function or file, and by report consumers to fold a file’s
suppress-file scope into each function’s own scope (issue #501).
Trait Implementations§
Source§impl Clone for SuppressionScope
impl Clone for SuppressionScope
Source§fn clone(&self) -> SuppressionScope
fn clone(&self) -> SuppressionScope
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 moreSource§impl Debug for SuppressionScope
impl Debug for SuppressionScope
Source§impl Default for SuppressionScope
impl Default for SuppressionScope
Source§impl<'de> Deserialize<'de> for SuppressionScope
impl<'de> Deserialize<'de> for SuppressionScope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SuppressionScope
Source§impl PartialEq for SuppressionScope
impl PartialEq for SuppressionScope
Source§fn eq(&self, other: &SuppressionScope) -> bool
fn eq(&self, other: &SuppressionScope) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SuppressionScope
impl Serialize for SuppressionScope
impl StructuralPartialEq for SuppressionScope
Auto Trait Implementations§
impl Freeze for SuppressionScope
impl RefUnwindSafe for SuppressionScope
impl Send for SuppressionScope
impl Sync for SuppressionScope
impl Unpin for SuppressionScope
impl UnsafeUnpin for SuppressionScope
impl UnwindSafe for SuppressionScope
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,
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
Compare self to
key and return true if they are equal.