Tuple

Struct Tuple 

Source
pub struct Tuple {
    pub remote_address: RemoteAddress,
    pub local_address: LocalAddress,
}

Fields§

§remote_address: RemoteAddress§local_address: LocalAddress

Implementations§

Source§

impl Tuple

Source

pub const UNSPECIFIED: Self

Source

pub fn swap(&mut self)

Trait Implementations§

Source§

impl Clone for Tuple

Source§

fn clone(&self) -> Tuple

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Tuple

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventHandler for Tuple

Source§

fn on_ethernet_header(&mut self, header: &Header) -> Result

Source§

fn on_ipv4_header(&mut self, header: &Header) -> Result

Source§

fn on_ipv6_header(&mut self, header: &Header) -> Result

Source§

fn on_udp_header(&mut self, header: &Header) -> Result

Source§

fn decode_packet<'a, D: Decoder<'a>>(&mut self, buffer: D) -> Result<D>

Source§

impl Handle for Tuple

Source§

fn from_remote_address(remote_address: RemoteAddress) -> Self

Creates a Handle from a RemoteAddress
Source§

fn remote_address(&self) -> RemoteAddress

Returns the remote address for the given handle
Source§

fn set_remote_address(&mut self, addr: RemoteAddress)

Updates the remote address to the given value
Source§

fn local_address(&self) -> LocalAddress

Returns the local address for the given handle
Source§

fn set_local_address(&mut self, addr: LocalAddress)

Updates the local address to the given value
Source§

fn unmapped_eq(&self, other: &Self) -> bool

Returns true if the two handles are equal from a network perspective Read more
Source§

fn strict_eq(&self, other: &Self) -> bool

Returns true if the two handles are strictly equal to each other, i.e. byte-for-byte.
Source§

fn maybe_update(&mut self, other: &Self)

Depending on the current value of self, fields from other may be copied to increase the fidelity of the value. Read more
Source§

impl PartialEq for Tuple

Source§

fn eq(&self, other: &Tuple) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Tuple

Source§

impl Eq for Tuple

Source§

impl StructuralPartialEq for Tuple

Auto Trait Implementations§

§

impl Freeze for Tuple

§

impl RefUnwindSafe for Tuple

§

impl Send for Tuple

§

impl Sync for Tuple

§

impl Unpin for Tuple

§

impl UnwindSafe for Tuple

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> Upcast<T> for U
where T: UpcastFrom<U>,

Source§

fn upcast(self) -> T

Source§

impl<T, B> UpcastFrom<Counter<T, B>> for T

Source§

fn upcast_from(value: Counter<T, B>) -> T