pub enum Endpoint {
Dialer {
address: Multiaddr,
connection_id: ConnectionId,
},
Listener {
address: Multiaddr,
connection_id: ConnectionId,
},
}
Expand description
Connection endpoint.
Variants§
Dialer
Successfully established outbound connection.
Listener
Successfully established inbound connection.
Implementations§
source§impl Endpoint
impl Endpoint
sourcepub fn connection_id(&self) -> ConnectionId
pub fn connection_id(&self) -> ConnectionId
Get ConnectionId
of the Endpoint
.
sourcepub fn is_listener(&self) -> bool
pub fn is_listener(&self) -> bool
Is this a listener endpoint?
Trait Implementations§
source§impl PartialEq for Endpoint
impl PartialEq for Endpoint
impl Eq for Endpoint
impl StructuralPartialEq for Endpoint
Auto Trait Implementations§
impl Freeze for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.