Enum pcap_file::pcapng::Block

source ·
pub enum Block<'a> {
    SectionHeader(SectionHeaderBlock<'a>),
    InterfaceDescription(InterfaceDescriptionBlock<'a>),
    Packet(PacketBlock<'a>),
    SimplePacket(SimplePacketBlock<'a>),
    NameResolution(NameResolutionBlock<'a>),
    InterfaceStatistics(InterfaceStatisticsBlock<'a>),
    EnhancedPacket(EnhancedPacketBlock<'a>),
    SystemdJournalExport(SystemdJournalExportBlock<'a>),
    Unknown(UnknownBlock<'a>),
}
Expand description

PcapNg parsed blocks

Variants§

§

SectionHeader(SectionHeaderBlock<'a>)

Section Header block

§

InterfaceDescription(InterfaceDescriptionBlock<'a>)

Interface Description block

§

Packet(PacketBlock<'a>)

Packet block

§

SimplePacket(SimplePacketBlock<'a>)

Simple packet block

§

NameResolution(NameResolutionBlock<'a>)

Name Resolution block

§

InterfaceStatistics(InterfaceStatisticsBlock<'a>)

Interface statistics block

§

EnhancedPacket(EnhancedPacketBlock<'a>)

Enhanced packet block

§

SystemdJournalExport(SystemdJournalExportBlock<'a>)

Systemd Journal Export block

§

Unknown(UnknownBlock<'a>)

Unknown block

Implementations§

Returns a version of self with all fields converted to owning versions.

Parses a Block from a slice

Writes a Block to a writer.

Tries to create a Block from a RawBlock.

The RawBlock must be Borrowed.

Tries to downcasts the current block into an EnhancedPacketBlock

Tries to downcasts the current block into an InterfaceDescriptionBlock

Tries to downcasts the current block into an InterfaceStatisticsBlock

Tries to downcast the current block into an NameResolutionBlock, if possible

Tries to downcast the current block into an PacketBlock, if possible

Tries to downcast the current block into an SectionHeaderBlock, if possible

Tries to downcast the current block into an SimplePacketBlock, if possible

Tries to downcast the current block into an SystemdJournalExportBlock, if possible

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.