#[non_exhaustive]pub struct PeerInfo {
pub peer_addr: Option<String>,
pub ext: Option<Arc<dyn Any + Send + Sync>>,
}Expand description
Remote-peer metadata carried by a Connection.
A neutral peer_addr plus a type-erased
ext slot a connector fills with its own resolved identity
(e.g. WS attaches ClientInfo at the HTTP upgrade), keeping core
connector-agnostic. Downcast ext with ext_as.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.peer_addr: Option<String>Remote address, if the transport exposes one.
ext: Option<Arc<dyn Any + Send + Sync>>Connector-resolved identity, type-erased so core need not know the
connector’s auth types. Downcast with ext_as.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PeerInfo
impl !UnwindSafe for PeerInfo
impl Freeze for PeerInfo
impl Send for PeerInfo
impl Sync for PeerInfo
impl Unpin for PeerInfo
impl UnsafeUnpin for PeerInfo
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