pub struct StrategyContext<'a> {
pub name: &'a Arc<Name>,
pub in_face: FaceId,
pub fib_entry: Option<&'a FibEntry>,
pub pit_token: Option<PitToken>,
pub measurements: &'a MeasurementsTable,
pub extensions: &'a AnyMap,
}Expand description
An immutable view of the engine state provided to strategy methods.
Strategies cannot mutate forwarding tables directly — they return
ForwardingAction values and the pipeline runner acts on them.
Fields§
§name: &'a Arc<Name>The name being forwarded.
in_face: FaceIdThe face the Interest or Data arrived on.
fib_entry: Option<&'a FibEntry>FIB entry for the longest matching prefix of name.
pit_token: Option<PitToken>PIT token for the current Interest, if applicable.
measurements: &'a MeasurementsTableRead-only access to EWMA measurements per (prefix, face).
extensions: &'a AnyMapCross-layer enrichment data (radio metrics, flow stats, etc.).
Populated by ContextEnricher instances
before the strategy runs. Strategies access typed data via
ctx.extensions.get::<T>().
Auto Trait Implementations§
impl<'a> Freeze for StrategyContext<'a>
impl<'a> !RefUnwindSafe for StrategyContext<'a>
impl<'a> Send for StrategyContext<'a>
impl<'a> Sync for StrategyContext<'a>
impl<'a> Unpin for StrategyContext<'a>
impl<'a> !UnwindSafe for StrategyContext<'a>
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