Struct libp2p_core::connection::PendingConnection
source · [−]pub struct PendingConnection<'a, THandler: IntoConnectionHandler> { /* private fields */ }Expand description
A pending connection in a pool.
Implementations
sourceimpl<THandler: IntoConnectionHandler> PendingConnection<'_, THandler>
impl<THandler: IntoConnectionHandler> PendingConnection<'_, THandler>
sourcepub fn id(&self) -> ConnectionId
pub fn id(&self) -> ConnectionId
Returns the local connection ID.
sourcepub fn peer_id(&self) -> &Option<PeerId>
pub fn peer_id(&self) -> &Option<PeerId>
Returns the (expected) identity of the remote peer, if known.
sourcepub fn endpoint(&self) -> &PendingPoint
pub fn endpoint(&self) -> &PendingPoint
Returns information about this endpoint of the connection.
Auto Trait Implementations
impl<'a, THandler> !RefUnwindSafe for PendingConnection<'a, THandler>
impl<'a, THandler> Send for PendingConnection<'a, THandler> where
THandler: Send,
impl<'a, THandler> Sync for PendingConnection<'a, THandler> where
THandler: Sync,
impl<'a, THandler> Unpin for PendingConnection<'a, THandler>
impl<'a, THandler> !UnwindSafe for PendingConnection<'a, THandler>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more