Struct network::peer_manager::ConnectionRequestSender
source · pub struct ConnectionRequestSender { /* private fields */ }
Expand description
Convenience wrapper which makes it easy to issue connection requests and await the responses from PeerManager.
Implementations§
source§impl ConnectionRequestSender
impl ConnectionRequestSender
sourcepub fn new(inner: Sender<PeerId, ConnectionRequest>) -> Self
pub fn new(inner: Sender<PeerId, ConnectionRequest>) -> Self
Construct a new ConnectionRequestSender with a raw diem_channel::Sender
pub async fn dial_peer( &mut self, peer: PeerId, addr: NetworkAddress ) -> Result<(), PeerManagerError>
pub async fn disconnect_peer( &mut self, peer: PeerId ) -> Result<(), PeerManagerError>
Trait Implementations§
source§impl Clone for ConnectionRequestSender
impl Clone for ConnectionRequestSender
source§fn clone(&self) -> ConnectionRequestSender
fn clone(&self) -> ConnectionRequestSender
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more