pub struct Codel { /* private fields */ }Expand description
The CoDel controller: per-class delay windows, one shared limit.
Implementations§
Source§impl Codel
impl Codel
Sourcepub fn record(&self, class: OpClass, sojourn: Duration)
pub fn record(&self, class: OpClass, sojourn: Duration)
Record one item’s sojourn, and adjust the shared limit if this closed
class’s window.
Sourcepub fn record_at(&self, class: OpClass, sojourn: Duration, now: Instant)
pub fn record_at(&self, class: OpClass, sojourn: Duration, now: Instant)
Codel::record with the clock supplied.
The seam a test drives: Instant cannot be constructed, but it can be
offset, so a test captures one Instant::now() and hands this window
boundaries to the microsecond instead of sleeping for them.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Codel
impl RefUnwindSafe for Codel
impl Send for Codel
impl Sync for Codel
impl Unpin for Codel
impl UnsafeUnpin for Codel
impl UnwindSafe for Codel
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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