pub struct PeerAddr<Id, A>{
pub id: Id,
pub addr: A,
}
Fields§
§id: Id
§addr: A
Implementations§
Trait Implementations§
Source§impl<Id, H, const DEFAULT_PORT: u16> From<PeerAddr<Id, PartialAddr<H, DEFAULT_PORT>>> for PeerAddr<Id, NetAddr<H>>
impl<Id, H, const DEFAULT_PORT: u16> From<PeerAddr<Id, PartialAddr<H, DEFAULT_PORT>>> for PeerAddr<Id, NetAddr<H>>
Source§impl<Id, A> Ord for PeerAddr<Id, A>
impl<Id, A> Ord for PeerAddr<Id, A>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Id, A> PartialOrd for PeerAddr<Id, A>
impl<Id, A> PartialOrd for PeerAddr<Id, A>
Source§impl<Id, A> ToSocketAddr for PeerAddr<Id, A>
impl<Id, A> ToSocketAddr for PeerAddr<Id, A>
fn to_socket_addr(&self) -> SocketAddr
Source§impl<Id, A> ToSocketAddrs for PeerAddr<Id, A>
impl<Id, A> ToSocketAddrs for PeerAddr<Id, A>
Source§type Iter = <A as ToSocketAddrs>::Iter
type Iter = <A as ToSocketAddrs>::Iter
Returned iterator over socket addresses which this type may correspond
to.
Source§fn to_socket_addrs(&self) -> Result<<A as ToSocketAddrs>::Iter, Error>
fn to_socket_addrs(&self) -> Result<<A as ToSocketAddrs>::Iter, Error>
Converts this object to an iterator of resolved
SocketAddr
s. Read moreimpl<Id, A> Copy for PeerAddr<Id, A>
impl<Id, A> Eq for PeerAddr<Id, A>
impl<Id, A> StructuralPartialEq for PeerAddr<Id, A>
Auto Trait Implementations§
impl<Id, A> Freeze for PeerAddr<Id, A>
impl<Id, A> RefUnwindSafe for PeerAddr<Id, A>where
Id: RefUnwindSafe,
A: RefUnwindSafe,
impl<Id, A> Send for PeerAddr<Id, A>where
A: Send,
impl<Id, A> Sync for PeerAddr<Id, A>
impl<Id, A> Unpin for PeerAddr<Id, A>
impl<Id, A> UnwindSafe for PeerAddr<Id, A>where
Id: UnwindSafe,
A: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more