pub struct PeerAddress(/* private fields */);Implementations§
Source§impl PeerAddress
impl PeerAddress
pub fn new(p: PeerId, a: NetworkAddress) -> Self
pub fn peer_id(&self) -> PeerId
pub fn network_address(&self) -> &NetworkAddress
Trait Implementations§
Source§impl Clone for PeerAddress
impl Clone for PeerAddress
Source§fn clone(&self) -> PeerAddress
fn clone(&self) -> PeerAddress
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeerAddress
impl Debug for PeerAddress
Source§impl<'de> Deserialize<'de> for PeerAddress
impl<'de> Deserialize<'de> for PeerAddress
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 Display for PeerAddress
impl Display for PeerAddress
Source§impl From<(PeerId, NetworkAddress)> for PeerAddress
impl From<(PeerId, NetworkAddress)> for PeerAddress
Source§fn from(value: (PeerId, NetworkAddress)) -> Self
fn from(value: (PeerId, NetworkAddress)) -> Self
Converts to this type from the input type.
Source§impl FromStr for PeerAddress
impl FromStr for PeerAddress
Source§impl PartialEq for PeerAddress
impl PartialEq for PeerAddress
Source§impl Serialize for PeerAddress
impl Serialize for PeerAddress
impl Eq for PeerAddress
impl StructuralPartialEq for PeerAddress
Auto Trait Implementations§
impl Freeze for PeerAddress
impl RefUnwindSafe for PeerAddress
impl Send for PeerAddress
impl Sync for PeerAddress
impl Unpin for PeerAddress
impl UnwindSafe for PeerAddress
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> 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.