pub enum PcapFormat {
LegacyLeMicro,
LegacyBeMicro,
LegacyLeNano,
LegacyBeNano,
PcapNg,
}Expand description
Format of the PCAP file.
Variants§
LegacyLeMicro
Classic PCAP (little-endian, microseconds)
LegacyBeMicro
Classic PCAP (big-endian, microseconds)
LegacyLeNano
Classic PCAP (little-endian, nanoseconds)
LegacyBeNano
Classic PCAP (big-endian, nanoseconds)
PcapNg
PCAPNG format
Implementations§
Source§impl PcapFormat
impl PcapFormat
Sourcepub fn is_little_endian(&self) -> bool
pub fn is_little_endian(&self) -> bool
Whether this format uses little-endian byte order.
This is relevant for parsing header fields like link_type. For PCAPNG, the section header defines endianness, but we assume little-endian as it’s the most common case.
Trait Implementations§
Source§impl Clone for PcapFormat
impl Clone for PcapFormat
Source§fn clone(&self) -> PcapFormat
fn clone(&self) -> PcapFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PcapFormat
impl Debug for PcapFormat
Source§impl PartialEq for PcapFormat
impl PartialEq for PcapFormat
impl Copy for PcapFormat
impl Eq for PcapFormat
impl StructuralPartialEq for PcapFormat
Auto Trait Implementations§
impl Freeze for PcapFormat
impl RefUnwindSafe for PcapFormat
impl Send for PcapFormat
impl Sync for PcapFormat
impl Unpin for PcapFormat
impl UnwindSafe for PcapFormat
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