pub struct SyncPcapReader<R: Read> { /* private fields */ }Implementations§
Source§impl<R: Read> SyncPcapReader<R>
impl<R: Read> SyncPcapReader<R>
Sourcepub fn new(reader: R) -> Result<Self, PcapParseError>
pub fn new(reader: R) -> Result<Self, PcapParseError>
Creates a new SyncPcapReader from a reader
Returns Ok(Self) on success, or Err if there was an error
reading the file header
A buffer is allocated based on the snap length in the file header
Sourcepub fn file_header(&self) -> &PcapFileHeader
pub fn file_header(&self) -> &PcapFileHeader
Returns the file header of the pcap file
pub fn next_packet( &mut self, ) -> Result<Option<(PacketHeader, &[u8])>, PcapParseError>
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for SyncPcapReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for SyncPcapReader<R>where
R: RefUnwindSafe,
impl<R> Send for SyncPcapReader<R>where
R: Send,
impl<R> Sync for SyncPcapReader<R>where
R: Sync,
impl<R> Unpin for SyncPcapReader<R>where
R: Unpin,
impl<R> UnwindSafe for SyncPcapReader<R>where
R: 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