pub trait StrategyFilter:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &str;
fn filter(
&self,
ctx: &StrategyContext<'_>,
actions: SmallVec<[ForwardingAction; 2]>,
) -> SmallVec<[ForwardingAction; 2]>;
}Expand description
Post-processes forwarding actions from an inner strategy.
Filters are applied in order by ComposedStrategy. Each filter can
reorder, remove, or augment faces in Forward actions — for example,
removing faces with RSSI below a threshold.
If a filter removes all faces from a Forward action, the composed
strategy falls through to the next action in the list (typically Nack
or Suppress).
Required Methods§
Sourcefn filter(
&self,
ctx: &StrategyContext<'_>,
actions: SmallVec<[ForwardingAction; 2]>,
) -> SmallVec<[ForwardingAction; 2]>
fn filter( &self, ctx: &StrategyContext<'_>, actions: SmallVec<[ForwardingAction; 2]>, ) -> SmallVec<[ForwardingAction; 2]>
Transform or prune forwarding actions produced by the inner strategy.