pub trait PacketCaptureReader {
type Error;
// Required methods
fn link_type(&self) -> Option<LinkType>;
fn next_packet(
&mut self,
) -> Option<Result<(Duration, Vec<u8>), Self::Error>>;
}Expand description
Common interface for reading packet captures (pcap or pcapng).
Two adapters implement this trait: PcapReader and PcapNgReader.
Both yield (timestamp, raw_packet_data) tuples regardless of the
underlying file format.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".