pub struct NetworkPeer {
pub peer: Vec<u8>,
pub addresses: Vec<String>,
}Expand description
Direct peer connection.
Fields§
§peer: Vec<u8>The [libp2p::PeerId] as bytes.
addresses: Vec<String>Optional known Multi-addresses. If empty, mDNS, Kademila and Bluetooth LE may be used to resolve.
Trait Implementations§
Source§impl Clone for NetworkPeer
impl Clone for NetworkPeer
Source§fn clone(&self) -> NetworkPeer
fn clone(&self) -> NetworkPeer
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 NetworkPeer
impl Debug for NetworkPeer
Source§impl<'de> Deserialize<'de> for NetworkPeer
impl<'de> Deserialize<'de> for NetworkPeer
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 Hash for NetworkPeer
impl Hash for NetworkPeer
Source§impl Ord for NetworkPeer
impl Ord for NetworkPeer
Source§fn cmp(&self, other: &NetworkPeer) -> Ordering
fn cmp(&self, other: &NetworkPeer) -> Ordering
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 PartialEq for NetworkPeer
impl PartialEq for NetworkPeer
Source§impl PartialOrd for NetworkPeer
impl PartialOrd for NetworkPeer
Source§impl Serialize for NetworkPeer
impl Serialize for NetworkPeer
impl Eq for NetworkPeer
impl StructuralPartialEq for NetworkPeer
Auto Trait Implementations§
impl Freeze for NetworkPeer
impl RefUnwindSafe for NetworkPeer
impl Send for NetworkPeer
impl Sync for NetworkPeer
impl Unpin for NetworkPeer
impl UnsafeUnpin for NetworkPeer
impl UnwindSafe for NetworkPeer
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<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