pub struct DefaultAdmissionPolicy;Expand description
Default policy: admit only Data packets that have a positive FreshnessPeriod.
Data without FreshnessPeriod or with FreshnessPeriod=0 is immediately stale
and not worth caching — it would fill the CS with entries that can never
satisfy MustBeFresh Interests, causing eviction churn under high throughput.
This matches NFD’s default admit policy behavior.
Trait Implementations§
Source§impl CsAdmissionPolicy for DefaultAdmissionPolicy
impl CsAdmissionPolicy for DefaultAdmissionPolicy
Source§fn should_admit(&self, data: &Data) -> bool
fn should_admit(&self, data: &Data) -> bool
Returns
true if the Data should be cached.Auto Trait Implementations§
impl Freeze for DefaultAdmissionPolicy
impl RefUnwindSafe for DefaultAdmissionPolicy
impl Send for DefaultAdmissionPolicy
impl Sync for DefaultAdmissionPolicy
impl Unpin for DefaultAdmissionPolicy
impl UnwindSafe for DefaultAdmissionPolicy
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