pub struct PacketCapture { /* private fields */ }Expand description
Records all traffic in memory via WireTap.
Use drain to retrieve and clear the buffer.
For bounded capture with automatic eviction, see
RingBufferCapture.
Prefer BusCapture for new code — it includes built-in
statistics counters.
Implementations§
Source§impl PacketCapture
impl PacketCapture
Trait Implementations§
Source§impl Default for PacketCapture
impl Default for PacketCapture
Source§impl WireTap for PacketCapture
impl WireTap for PacketCapture
Source§fn on_write(&self, bytes: &[u8], ts: u64)
fn on_write(&self, bytes: &[u8], ts: u64)
Bytes successfully written to the transport.
Called once per
poll_write that returns Ok(n) with n > 0.Auto Trait Implementations§
impl !Freeze for PacketCapture
impl RefUnwindSafe for PacketCapture
impl Send for PacketCapture
impl Sync for PacketCapture
impl Unpin for PacketCapture
impl UnsafeUnpin for PacketCapture
impl UnwindSafe for PacketCapture
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