pub struct BestRouteStrategy { /* private fields */ }Expand description
Best-route strategy: forward on the lowest-cost FIB nexthop, excluding the incoming face (split-horizon).
Implementations§
Source§impl BestRouteStrategy
impl BestRouteStrategy
Sourcepub fn strategy_name() -> Name
pub fn strategy_name() -> Name
NFD strategy name: /localhost/nfd/strategy/best-route
pub fn new() -> Self
Trait Implementations§
Source§impl Default for BestRouteStrategy
impl Default for BestRouteStrategy
Source§impl Strategy for BestRouteStrategy
impl Strategy for BestRouteStrategy
Source§fn decide(
&self,
ctx: &StrategyContext<'_>,
) -> Option<SmallVec<[ForwardingAction; 2]>>
fn decide( &self, ctx: &StrategyContext<'_>, ) -> Option<SmallVec<[ForwardingAction; 2]>>
Synchronous fast path for forwarding decisions. Read more
Source§async fn after_receive_interest(
&self,
ctx: &StrategyContext<'_>,
) -> SmallVec<[ForwardingAction; 2]>
async fn after_receive_interest( &self, ctx: &StrategyContext<'_>, ) -> SmallVec<[ForwardingAction; 2]>
Called when an Interest arrives and needs a forwarding decision.
Source§async fn after_receive_data(
&self,
_ctx: &StrategyContext<'_>,
) -> SmallVec<[ForwardingAction; 2]>
async fn after_receive_data( &self, _ctx: &StrategyContext<'_>, ) -> SmallVec<[ForwardingAction; 2]>
Called when Data arrives and needs to be forwarded to consumers.
Source§fn on_interest_timeout(
&self,
_ctx: &StrategyContext<'_>,
) -> impl Future<Output = ForwardingAction> + Send
fn on_interest_timeout( &self, _ctx: &StrategyContext<'_>, ) -> impl Future<Output = ForwardingAction> + Send
Called when a PIT entry times out. Default: suppress (let the entry die).
Source§fn on_nack(
&self,
_ctx: &StrategyContext<'_>,
_reason: NackReason,
) -> impl Future<Output = ForwardingAction> + Send
fn on_nack( &self, _ctx: &StrategyContext<'_>, _reason: NackReason, ) -> impl Future<Output = ForwardingAction> + Send
Called when a Nack arrives on an out-record face.
Auto Trait Implementations§
impl !Freeze for BestRouteStrategy
impl RefUnwindSafe for BestRouteStrategy
impl Send for BestRouteStrategy
impl Sync for BestRouteStrategy
impl Unpin for BestRouteStrategy
impl UnwindSafe for BestRouteStrategy
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