pub struct ValidationConfig {
pub lateness: LatenessPolicy,
pub max_octets_per_second: u64,
pub escalate: Vec<Rule>,
}Expand description
What the stateless rules compare against.
Fields§
§lateness: LatenessPolicyThe inclusion policy behind V10 and V11.
max_octets_per_second: u64The highest sustained rate a bearer could plausibly carry, in octets per second, for V05.
A ceiling, not a tariff: it exists to catch a corrupt counter, so it should sit well above any real bearer. The default of 10 GB/s is far above 5G peak rates and still catches a field read at the wrong offset.
escalate: Vec<Rule>Rules to raise to Severity::Blocking beyond their default.
Additive only. A rule’s default severity can be tightened but never loosened, because the defaults encode “billing this invoices an amount that cannot be defended” — which is not a local preference.
Implementations§
Source§impl ValidationConfig
impl ValidationConfig
Sourcepub fn severity_of(&self, rule: Rule) -> Severity
pub fn severity_of(&self, rule: Rule) -> Severity
The severity this configuration gives a rule.
Sourcepub fn escalating(self, rule: Rule) -> Self
pub fn escalating(self, rule: Rule) -> Self
The same configuration with a rule raised to blocking.
Trait Implementations§
Source§impl Clone for ValidationConfig
impl Clone for ValidationConfig
Source§impl Debug for ValidationConfig
impl Debug for ValidationConfig
Source§impl Default for ValidationConfig
impl Default for ValidationConfig
impl Eq for ValidationConfig
Source§impl PartialEq for ValidationConfig
impl PartialEq for ValidationConfig
impl StructuralPartialEq for ValidationConfig
Auto Trait Implementations§
impl Freeze for ValidationConfig
impl RefUnwindSafe for ValidationConfig
impl Send for ValidationConfig
impl Sync for ValidationConfig
impl Unpin for ValidationConfig
impl UnsafeUnpin for ValidationConfig
impl UnwindSafe for ValidationConfig
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