pub struct InterfacePathRequestLimits<C>where
C: InterfacePathRequestLimitTable,{ /* private fields */ }Implementations§
Source§impl<C> InterfacePathRequestLimits<C>where
C: InterfacePathRequestLimitTable,
impl<C> InterfacePathRequestLimits<C>where
C: InterfacePathRequestLimitTable,
pub fn should_egress_limit( &self, interface: InterfaceId, now: InstantMillis, policy: PathRequestEgressControl, ) -> bool
pub fn record_egress(&mut self, interface: InterfaceId, now: InstantMillis)
Sourcepub fn record_and_should_limit(
&mut self,
interface: InterfaceId,
now: InstantMillis,
) -> bool
pub fn record_and_should_limit( &mut self, interface: InterfaceId, now: InstantMillis, ) -> bool
Record a path request on interface and report whether to drop its recursive discovery forward. This implements RNS 1.4.2 Interface.should_ingress_limit_pr, replacing the 48-sample sliding deque with an integer fixed window of the same span.
pub fn record_and_should_limit_with_policy( &mut self, interface: InterfaceId, now: InstantMillis, policy: IngressControlPolicy, ) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<C> Debug for InterfacePathRequestLimits<C>where
C: Debug + InterfacePathRequestLimitTable,
impl<C> Debug for InterfacePathRequestLimits<C>where
C: Debug + InterfacePathRequestLimitTable,
Source§impl<C> Default for InterfacePathRequestLimits<C>where
C: Default + InterfacePathRequestLimitTable,
impl<C> Default for InterfacePathRequestLimits<C>where
C: Default + InterfacePathRequestLimitTable,
Source§fn default() -> InterfacePathRequestLimits<C>
fn default() -> InterfacePathRequestLimits<C>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<C> Freeze for InterfacePathRequestLimits<C>where
C: Freeze,
impl<C> RefUnwindSafe for InterfacePathRequestLimits<C>where
C: RefUnwindSafe,
impl<C> Send for InterfacePathRequestLimits<C>where
C: Send,
impl<C> Sync for InterfacePathRequestLimits<C>where
C: Sync,
impl<C> Unpin for InterfacePathRequestLimits<C>where
C: Unpin,
impl<C> UnsafeUnpin for InterfacePathRequestLimits<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for InterfacePathRequestLimits<C>where
C: UnwindSafe,
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