#[non_exhaustive]pub struct RuleMeta {
pub id: &'static str,
pub default_severity: Severity,
pub description: &'static str,
pub source: RuleSource,
}Expand description
Metadata about a single rule, as exposed by the public catalog.
Marked #[non_exhaustive] so that adding fields in future minor releases
does not break downstream code that reads (but never constructs) RuleMeta.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: &'static str§default_severity: Severity§description: &'static str§source: RuleSourceThe external standard this rule is derived from.
Implementations§
Source§impl RuleMeta
impl RuleMeta
Sourcepub fn revenue_impact(&self) -> bool
pub fn revenue_impact(&self) -> bool
Returns true when violating this rule has a direct revenue or
measurement impact — lost impressions, broken tracking, zero fill.
This covers both rules whose source is
RuleSource::IndustryBestPractice and rules whose source is an IAB
spec standard but whose real-world consequence is measurable revenue
loss (missing <Impression>, dead wrapper redirect, etc.).
Auto Trait Implementations§
impl Freeze for RuleMeta
impl RefUnwindSafe for RuleMeta
impl Send for RuleMeta
impl Sync for RuleMeta
impl Unpin for RuleMeta
impl UnsafeUnpin for RuleMeta
impl UnwindSafe for RuleMeta
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