[−][src]Enum quic_p2p::Peer
Representation of a peer to us.
Variants
Stores Node information.
Fields of Node
node_info: NodeInfo
Information needed to connect to a node.
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 Into<Peer> for NodeInfo
[src]
impl Clone for Peer
[src]
impl Eq for Peer
[src]
impl PartialEq<Peer> for Peer
[src]
impl Display for Peer
[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,
impl Serialize for Peer
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Peer
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl UnwindSafe for Peer
impl RefUnwindSafe for Peer
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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> 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,