pub trait AssociationRule: Send + Sync {
// Required methods
fn source_layer(&self) -> Layer;
fn target_layer(&self) -> Layer;
fn matches(&self, trace: &Trace, candidate: &Trace) -> bool;
// Provided methods
fn preferred_direction(&self, source: &Trace) -> SearchDirection { ... }
fn window_size(&self) -> usize { ... }
fn valid_source_messages(&self) -> &[&str] { ... }
fn valid_target_messages(&self) -> &[&str] { ... }
fn source_is_child(&self) -> bool { ... }
}Expand description
Trait for defining association rules between trace types
Required Methods§
Sourcefn source_layer(&self) -> Layer
fn source_layer(&self) -> Layer
The layer this rule applies to (source layer when searching)
Sourcefn target_layer(&self) -> Layer
fn target_layer(&self) -> Layer
The layer we’re searching for (target layer)
Provided Methods§
Sourcefn preferred_direction(&self, source: &Trace) -> SearchDirection
fn preferred_direction(&self, source: &Trace) -> SearchDirection
Get the preferred search direction based on the source trace
Sourcefn window_size(&self) -> usize
fn window_size(&self) -> usize
Get the window size (max number of traces to search in each direction)
Sourcefn valid_source_messages(&self) -> &[&str]
fn valid_source_messages(&self) -> &[&str]
Filter for valid source message names (if empty, all messages are valid) This is checked before attempting to match
Sourcefn valid_target_messages(&self) -> &[&str]
fn valid_target_messages(&self) -> &[&str]
Filter for valid target message names (if empty, all messages are valid) This is checked before attempting to match
Sourcefn source_is_child(&self) -> bool
fn source_is_child(&self) -> bool
Returns true if the source trace is the child in the relationship
- true: source is child, target is parent (e.g., NAS→RRC where NAS is child)
- false: source is parent, target is child (e.g., NGAP→NAS where NAS is child)