pub struct ConnectionPool { /* private fields */ }Expand description
Connection pool for managing peer connections.
Implementations§
Source§impl ConnectionPool
impl ConnectionPool
Sourcepub fn get(&self, node_id: &NodeId) -> Option<ConnectionState>
pub fn get(&self, node_id: &NodeId) -> Option<ConnectionState>
Get a connection.
Sourcepub fn mark_connected(&self, node_id: &NodeId)
pub fn mark_connected(&self, node_id: &NodeId)
Mark a connection as connected.
Sourcepub fn mark_disconnected(&self, node_id: &NodeId)
pub fn mark_disconnected(&self, node_id: &NodeId)
Mark a connection as disconnected.
Sourcepub fn connected_nodes(&self) -> Vec<NodeId>
pub fn connected_nodes(&self) -> Vec<NodeId>
Get all connected nodes.
Auto Trait Implementations§
impl !Freeze for ConnectionPool
impl RefUnwindSafe for ConnectionPool
impl Send for ConnectionPool
impl Sync for ConnectionPool
impl Unpin for ConnectionPool
impl UnsafeUnpin for ConnectionPool
impl UnwindSafe for ConnectionPool
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