pub struct StrategyStage {
pub strategy_table: Arc<StrategyTable<dyn ErasedStrategy>>,
pub default_strategy: Arc<dyn ErasedStrategy>,
pub fib: Arc<Fib>,
pub measurements: Arc<MeasurementsTable>,
pub pit: Arc<Pit>,
pub face_table: Arc<FaceTable>,
pub enrichers: Vec<Arc<dyn ContextEnricher>>,
}Expand description
Calls the strategy to produce a forwarding decision for Interests.
Performs LPM on the strategy table to find the per-prefix strategy.
Falls back to default_strategy if no entry matches (should not happen
if root is populated).
Fields§
§strategy_table: Arc<StrategyTable<dyn ErasedStrategy>>§default_strategy: Arc<dyn ErasedStrategy>§fib: Arc<Fib>§measurements: Arc<MeasurementsTable>§pit: Arc<Pit>§face_table: Arc<FaceTable>§enrichers: Vec<Arc<dyn ContextEnricher>>Cross-layer enrichers run before the strategy to populate StrategyContext::extensions.
Implementations§
Source§impl StrategyStage
impl StrategyStage
Sourcepub async fn process(&self, ctx: PacketContext) -> Action
pub async fn process(&self, ctx: PacketContext) -> Action
Run the per-prefix strategy for an Interest and return a pipeline action.
Auto Trait Implementations§
impl Freeze for StrategyStage
impl !RefUnwindSafe for StrategyStage
impl Send for StrategyStage
impl Sync for StrategyStage
impl Unpin for StrategyStage
impl !UnwindSafe for StrategyStage
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