AssociationRule

Trait AssociationRule 

Source
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§

Source

fn source_layer(&self) -> Layer

The layer this rule applies to (source layer when searching)

Source

fn target_layer(&self) -> Layer

The layer we’re searching for (target layer)

Source

fn matches(&self, trace: &Trace, candidate: &Trace) -> bool

Check if two traces are related according to this rule.

§Arguments
  • trace - The source trace
  • candidate - A potential related trace to check
§Returns
  • true if the traces are related

Provided Methods§

Source

fn preferred_direction(&self, source: &Trace) -> SearchDirection

Get the preferred search direction based on the source trace

Source

fn window_size(&self) -> usize

Get the window size (max number of traces to search in each direction)

Source

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

Source

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

Source

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)

Implementors§