Add Clone impl to Packet types
This commit is contained in:
parent
a9fc8c225b
commit
01f3b53e70
|
@ -21,7 +21,7 @@ enum_with_unknown! {
|
|||
}
|
||||
|
||||
/// A read/write wrapper around an Address Resolution Protocol packet buffer.
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub struct Packet<T: AsRef<[u8]>> {
|
||||
buffer: T
|
||||
}
|
||||
|
|
|
@ -166,7 +166,7 @@ enum_with_unknown! {
|
|||
}
|
||||
|
||||
/// A read/write wrapper around an Internet Control Message Protocol version 4 packet buffer.
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub struct Packet<T: AsRef<[u8]>> {
|
||||
buffer: T
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ impl fmt::Display for DstUnreachable {
|
|||
}
|
||||
|
||||
/// A read/write wrapper around an Internet Control Message Protocol version 6 packet buffer.
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub struct Packet<T: AsRef<[u8]>> {
|
||||
buffer: T
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ impl fmt::Display for Cidr {
|
|||
}
|
||||
|
||||
/// A read/write wrapper around an Internet Protocol version 4 packet buffer.
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub struct Packet<T: AsRef<[u8]>> {
|
||||
buffer: T
|
||||
}
|
||||
|
|
|
@ -302,7 +302,7 @@ impl fmt::Display for Cidr {
|
|||
}
|
||||
|
||||
/// A read/write wrapper around an Internet Protocol version 6 packet buffer.
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub struct Packet<T: AsRef<[u8]>> {
|
||||
buffer: T
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ impl cmp::PartialOrd for SeqNumber {
|
|||
}
|
||||
|
||||
/// A read/write wrapper around a Transmission Control Protocol packet buffer.
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub struct Packet<T: AsRef<[u8]>> {
|
||||
buffer: T
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ use super::{IpProtocol, IpAddress};
|
|||
use super::ip::checksum;
|
||||
|
||||
/// A read/write wrapper around an User Datagram Protocol packet buffer.
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub struct Packet<T: AsRef<[u8]>> {
|
||||
buffer: T
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue