pub struct TrafficConsumer { /* private fields */ }Expand description
A typed reader over one traffic track. Yields the latest TrafficFrame;
intermediate frames a slow reader missed are collapsed, which is safe
because the counters are cumulative.
Implementations§
Source§impl TrafficConsumer
impl TrafficConsumer
Sourcepub async fn next(&mut self) -> Result<Option<TrafficFrame>>
pub async fn next(&mut self) -> Result<Option<TrafficFrame>>
The next frame, or None once the track ends (the producer went away).
Auto Trait Implementations§
impl !Freeze for TrafficConsumer
impl RefUnwindSafe for TrafficConsumer
impl Send for TrafficConsumer
impl Sync for TrafficConsumer
impl Unpin for TrafficConsumer
impl UnsafeUnpin for TrafficConsumer
impl UnwindSafe for TrafficConsumer
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