#[non_exhaustive]pub enum DataType {
TCP(TcpPacket),
UDP(UdpDatagram),
}Expand description
Data that the IP packet encapsulates
An IP packet can encapsulate many different types of data. Each possible encapsulated type that this library supports is represented by this enum.
This enum is marked as non-exhaustive as more underlying types may be added in future versions of the library.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TCP(TcpPacket)
UDP(UdpDatagram)
Implementations§
Trait Implementations§
Source§impl From<UdpDatagram> for DataType
impl From<UdpDatagram> for DataType
Source§fn from(packet: UdpDatagram) -> Self
fn from(packet: UdpDatagram) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DataType
impl RefUnwindSafe for DataType
impl Send for DataType
impl Sync for DataType
impl Unpin for DataType
impl UnwindSafe for DataType
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