Struct pcap_file::Packet [] [src]

pub struct Packet<'a> {
    pub header: PacketHeader,
    pub data: Cow<'a, [u8]>,
}

Represents a pcap packet.

The payload can be owned or borrowed.

Fields

Header of the packet

Payload, owned or borrowed, of the packet

Methods

impl<'a> Packet<'a>
[src]

[src]

Create a new borrowed Packet with the given parameters.

[src]

Create a new owned Packet with the given parameters.

[src]

Create a new owned Packet from a reader.

[src]

Create a new borrowed Packet from a slice.

[src]

Convert a borrowed Packet to an owned one.

Trait Implementations

impl<'a> Clone for Packet<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for Packet<'a>
[src]

[src]

Formats the value using the given formatter.