Add Clone impl to Packet types

This commit is contained in:
Andrew Cann 2018-02-05 19:42:05 +08:00 committed by whitequark
parent a9fc8c225b
commit 01f3b53e70
7 changed files with 7 additions and 7 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}