pub enum PacketOption<'a> {
Comment(Cow<'a, str>),
Flags(u32),
Hash(Cow<'a, [u8]>),
CustomBinary(CustomBinaryOption<'a>),
CustomUtf8(CustomUtf8Option<'a>),
Unknown(UnknownOption<'a>),
}
Expand description
Packet Block option
Variants§
Comment(Cow<'a, str>)
Comment associated with the current block
Flags(u32)
32-bit flags word containing link-layer information.
Hash(Cow<'a, [u8]>)
Contains a hash of the packet.
CustomBinary(CustomBinaryOption<'a>)
Custom option containing binary octets in the Custom Data portion
CustomUtf8(CustomUtf8Option<'a>)
Custom option containing a UTF-8 string in the Custom Data portion
Unknown(UnknownOption<'a>)
Unknown option
Implementations§
source§impl<'a> PacketOption<'a>
impl<'a> PacketOption<'a>
sourcepub fn into_owned(self) -> PacketOption<'static>
pub fn into_owned(self) -> PacketOption<'static>
Returns a version of self
with all fields converted to owning versions.
Trait Implementations§
source§impl<'a> Clone for PacketOption<'a>
impl<'a> Clone for PacketOption<'a>
source§fn clone(&self) -> PacketOption<'a>
fn clone(&self) -> PacketOption<'a>
Returns a copy 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<'a> Debug for PacketOption<'a>
impl<'a> Debug for PacketOption<'a>
source§impl<'a> PartialEq<PacketOption<'a>> for PacketOption<'a>
impl<'a> PartialEq<PacketOption<'a>> for PacketOption<'a>
source§fn eq(&self, other: &PacketOption<'a>) -> bool
fn eq(&self, other: &PacketOption<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.