pub struct TupleEth {
pub src: EthAddr,
pub dst: EthAddr,
pub protocol: EtherProto,
}Fields§
§src: EthAddr§dst: EthAddr§protocol: EtherProtoImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TupleEth
impl<'de> Deserialize<'de> for TupleEth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Tuple for TupleEth
impl Tuple for TupleEth
type Addr = EthAddr
Source§fn source_port(&self) -> u16
fn source_port(&self) -> u16
Returns the source port of the flow tuple.
Source§fn from_packet(pkt: &Packet<'_>, _vni_mapper: &mut VniMapper) -> Option<Self>
fn from_packet(pkt: &Packet<'_>, _vni_mapper: &mut VniMapper) -> Option<Self>
Create a new flow tuple from a packet
Source§fn hash_canonical<H: Hasher>(&self, state: &mut H)
fn hash_canonical<H: Hasher>(&self, state: &mut H)
Hashes the tuple in a canonical (symmetric) way without creating a new instance.
Used by
Symmetric wrapper to ensure Hash(A->B) == Hash(B->A).Source§fn eq_canonical(&self, other: &Self) -> bool
fn eq_canonical(&self, other: &Self) -> bool
Checks equality in a canonical (symmetric) way without creating a new instance.
Used by
Symmetric wrapper to ensure Eq(A->B, B->A).Source§fn is_symmetric(&self) -> bool
fn is_symmetric(&self) -> bool
Checks if the tuple is symmetric (source equals destination). Read more
impl Copy for TupleEth
impl Eq for TupleEth
impl StructuralPartialEq for TupleEth
Auto Trait Implementations§
impl Freeze for TupleEth
impl RefUnwindSafe for TupleEth
impl Send for TupleEth
impl Sync for TupleEth
impl Unpin for TupleEth
impl UnsafeUnpin for TupleEth
impl UnwindSafe for TupleEth
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