pub struct CaptureBuffer { /* private fields */ }Expand description
Fixed-capacity queue of interleaved wire frames. Configure once before transfer submission; retain newest frames when the reader falls behind.
Implementations§
Source§impl CaptureBuffer
impl CaptureBuffer
pub fn new( format: CaptureFormat, capacity_frames: usize, ) -> Result<Self, CaptureError>
pub fn format(&self) -> &CaptureFormat
pub fn available_frames(&self) -> usize
pub fn stats(&self) -> CaptureStats
pub fn state(&self) -> CaptureState
pub fn stop(&mut self)
pub fn fail(&mut self)
Sourcepub fn ingest_completion(
&mut self,
data: &[u8],
submitted: &[usize],
packets: &[CapturePacket],
transfer_succeeded: bool,
known_missing_frames: u64,
) -> Result<(), CaptureError>
pub fn ingest_completion( &mut self, data: &[u8], submitted: &[usize], packets: &[CapturePacket], transfer_succeeded: bool, known_missing_frames: u64, ) -> Result<(), CaptureError>
Validate the entire submitted geometry before accepting any payload. Buffer length must equal the sum of immutable submitted packet lengths; packet offsets advance by submitted capacity, never by actual length. Failed transfers have no trustworthy payload, regardless of packet flags.
Auto Trait Implementations§
impl Forget for CaptureBuffer
impl Freeze for CaptureBuffer
impl Move for CaptureBuffer
impl RefUnwindSafe for CaptureBuffer
impl Send for CaptureBufferwhere
RawVecInner: Send,
impl Sync for CaptureBufferwhere
RawVecInner: Sync,
impl Unpin for CaptureBuffer
impl UnsafeUnpin for CaptureBufferwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<ChannelPosition>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for CaptureBufferwhere
RawVecInner: 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