pub struct RemoteAddress(pub SocketAddress);

Tuple Fields§

§0: SocketAddress

Methods from Deref<Target = SocketAddress>§

source

pub fn ip(&self) -> IpAddress

source

pub fn port(&self) -> u16

source

pub fn set_port(&mut self, port: u16)

source

pub fn unicast_scope(&self) -> Option<UnicastScope>

Trait Implementations§

source§

impl Clone for RemoteAddress

source§

fn clone(&self) -> RemoteAddress

Returns a copy 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 RemoteAddress

source§

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

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

impl Default for RemoteAddress

source§

fn default() -> RemoteAddress

Returns the “default value” for a type. Read more
source§

impl Deref for RemoteAddress

§

type Target = SocketAddress

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for RemoteAddress

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl From<RemoteAddress> for RemoteAddress

source§

fn from(addr: RemoteAddress) -> Self

Converts to this type from the input type.
source§

impl From<RemoteAddress> for RemoteAddress

source§

fn from(addr: RemoteAddress) -> Self

Converts to this type from the input type.
source§

impl From<SocketAddress<'_>> for RemoteAddress

source§

fn from(value: SocketAddress<'_>) -> Self

Converts to this type from the input type.
source§

impl From<SocketAddress> for RemoteAddress

source§

fn from(value: SocketAddress) -> Self

Converts to this type from the input type.
source§

impl From<SocketAddressV4> for RemoteAddress

source§

fn from(value: SocketAddressV4) -> Self

Converts to this type from the input type.
source§

impl From<SocketAddressV6> for RemoteAddress

source§

fn from(value: SocketAddressV6) -> Self

Converts to this type from the input type.
source§

impl Handle for RemoteAddress

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_port(&mut self, port: u16)

Updates the remote port to the given value
source§

fn local_address(&self) -> LocalAddress

Returns the local address for the given handle
source§

fn 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 Hash for RemoteAddress

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for RemoteAddress

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for RemoteAddress

source§

impl Eq for RemoteAddress

source§

impl StructuralPartialEq for RemoteAddress

Auto Trait Implementations§

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> 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,

§

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>,

§

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>,

§

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