pub enum RuleMetadataLookup {
Missing,
Unique(Box<RuleBundleMetadata>),
Ambiguous(Vec<RuleBundleMetadata>),
}Expand description
The outcome of resolving a rule key to metadata.
Variants§
Missing
No loaded rule carries the key. Expected when an incident outlives the rule that opened it across a reload.
Unique(Box<RuleBundleMetadata>)
Exactly one distinct metadata document carries the key.
Ambiguous(Vec<RuleBundleMetadata>)
Several rules carry the key with differing metadata, in the order the engines were built. Callers must decide how to present the conflict rather than being handed an arbitrary one.
Implementations§
Source§impl RuleMetadataLookup
impl RuleMetadataLookup
Sourcepub fn from_variants(variants: Vec<RuleBundleMetadata>) -> Self
pub fn from_variants(variants: Vec<RuleBundleMetadata>) -> Self
Collapse candidate variants into a lookup outcome, treating identical documents as one. Routed rule sets compile the same rule once per pipeline-set, so most keys yield several byte-identical candidates.
Sourcepub fn variants(&self) -> &[RuleBundleMetadata]
pub fn variants(&self) -> &[RuleBundleMetadata]
Every candidate document, empty when the key is unknown.
Trait Implementations§
Source§impl Clone for RuleMetadataLookup
impl Clone for RuleMetadataLookup
Source§fn clone(&self) -> RuleMetadataLookup
fn clone(&self) -> RuleMetadataLookup
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 RuleMetadataLookup
impl Debug for RuleMetadataLookup
Source§impl PartialEq for RuleMetadataLookup
impl PartialEq for RuleMetadataLookup
impl StructuralPartialEq for RuleMetadataLookup
Auto Trait Implementations§
impl Freeze for RuleMetadataLookup
impl RefUnwindSafe for RuleMetadataLookup
impl Send for RuleMetadataLookup
impl Sync for RuleMetadataLookup
impl Unpin for RuleMetadataLookup
impl UnsafeUnpin for RuleMetadataLookup
impl UnwindSafe for RuleMetadataLookup
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