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 for PacketOption<'a>
impl<'a> PartialEq for PacketOption<'a>
impl<'a> Eq for PacketOption<'a>
impl<'a> StructuralPartialEq for PacketOption<'a>
Auto Trait Implementations§
impl<'a> Freeze for PacketOption<'a>
impl<'a> RefUnwindSafe for PacketOption<'a>
impl<'a> Send for PacketOption<'a>
impl<'a> Sync for PacketOption<'a>
impl<'a> Unpin for PacketOption<'a>
impl<'a> UnwindSafe for PacketOption<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more