Enum libp2p_core::nodes::raw_swarm::ConnectedPoint
source · pub enum ConnectedPoint {
Dialer {
address: Multiaddr,
},
Listener {
listen_addr: Multiaddr,
send_back_addr: Multiaddr,
},
}
Expand description
How we connected to a node.
Variants
Dialer
Fields
address: Multiaddr
Multiaddress that was successfully dialed.
We dialed the node.
Listener
Fields
listen_addr: Multiaddr
Address of the listener that received the connection.
send_back_addr: Multiaddr
Stack of protocols used to send back data to the remote.
We received the node.
Implementations
sourceimpl ConnectedPoint
impl ConnectedPoint
sourcepub fn to_endpoint(&self) -> Endpoint
pub fn to_endpoint(&self) -> Endpoint
Turns the ConnectedPoint
into the corresponding Endpoint
.
sourcepub fn is_listener(&self) -> bool
pub fn is_listener(&self) -> bool
Returns true if we are Listener
.
Trait Implementations
sourceimpl Clone for ConnectedPoint
impl Clone for ConnectedPoint
sourcefn clone(&self) -> ConnectedPoint
fn clone(&self) -> ConnectedPoint
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ConnectedPoint
impl Debug for ConnectedPoint
sourceimpl<'a> From<&'a ConnectedPoint> for Endpoint
impl<'a> From<&'a ConnectedPoint> for Endpoint
sourcefn from(endpoint: &'a ConnectedPoint) -> Endpoint
fn from(endpoint: &'a ConnectedPoint) -> Endpoint
Converts to this type from the input type.
sourceimpl From<ConnectedPoint> for Endpoint
impl From<ConnectedPoint> for Endpoint
sourcefn from(endpoint: ConnectedPoint) -> Endpoint
fn from(endpoint: ConnectedPoint) -> Endpoint
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for ConnectedPoint
impl Send for ConnectedPoint
impl Sync for ConnectedPoint
impl Unpin for ConnectedPoint
impl UnwindSafe for ConnectedPoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more