Enum libp2p::core::ConnectedPoint [−][src]
pub enum ConnectedPoint {
Dialer {
address: Multiaddr,
},
Listener {
local_addr: Multiaddr,
send_back_addr: Multiaddr,
},
}
Expand description
The endpoint roles associated with an established peer-to-peer connection.
Variants
Dialer
Fields
address: Multiaddr
Multiaddress that was successfully dialed.
We dialed the node.
Listener
Fields
local_addr: Multiaddr
Local connection address.
send_back_addr: Multiaddr
Address used to send back data to the remote.
We received the node.
Implementations
Turns the ConnectedPoint
into the corresponding Endpoint
.
Returns true if we are Listener
.
Returns the address of the remote stored in this struct.
For Dialer
, this returns address
. For Listener
, this returns send_back_addr
.
Note that the remote node might not be listening on this address and hence the address might not be usable to establish new connections.
Modifies the address of the remote stored in this struct.
For Dialer
, this modifies address
. For Listener
, this modifies send_back_addr
.
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more