[−][src]Enum quic_p2p::Peer
Representation of a peer to us.
Variants
Node
Stores Node information.
Fields of Node
node_info: NodeInfo
Information needed to connect to a node.
Client
Stores client information.
Fields of Client
peer_addr: SocketAddr
Address of the client reaching us.
Methods
impl Peer
[src]
pub fn peer_addr(&self) -> SocketAddr
[src]
Get peer's Endpoint
pub fn peer_cert_der(&self) -> Option<&[u8]>
[src]
Get peer's Certificate
If the peer was a node then the function returns the certificate used by it. For clients it
is not useful in our network to share certificates as we don't reverse connect to the
clients. Due to absence of the knowledge of client's certificate (as it's not exchanged in
handshake) this function retuns None
for client peers.
Trait Implementations
impl PartialEq<Peer> for Peer
[src]
impl Clone for Peer
[src]
fn clone(&self) -> Peer
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Peer
[src]
impl Into<Peer> for NodeInfo
[src]
impl Debug for Peer
[src]
impl Hash for Peer
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'de> Deserialize<'de> for Peer
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Peer
[src]
Auto Trait Implementations
impl Unpin for Peer
impl Sync for Peer
impl Send for Peer
impl RefUnwindSafe for Peer
impl UnwindSafe for Peer
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,