pub struct RoutingTable { /* private fields */ }Expand description
Routing table for connection-to-connection routing
Implementations§
Source§impl RoutingTable
impl RoutingTable
Sourcepub fn add_route(&self, source: ConnectionId, target: ConnectionId)
pub fn add_route(&self, source: ConnectionId, target: ConnectionId)
Add a route
Sourcepub fn remove_route(&self, source: &ConnectionId, target: &ConnectionId)
pub fn remove_route(&self, source: &ConnectionId, target: &ConnectionId)
Remove a route
Sourcepub fn get_targets(&self, source: &ConnectionId) -> Vec<ConnectionId> ⓘ
pub fn get_targets(&self, source: &ConnectionId) -> Vec<ConnectionId> ⓘ
Get targets for a source
Sourcepub fn remove_connection(&self, connection: &ConnectionId)
pub fn remove_connection(&self, connection: &ConnectionId)
Remove all routes for a connection
Sourcepub fn route_count(&self) -> usize
pub fn route_count(&self) -> usize
Get route count
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoutingTable
impl !RefUnwindSafe for RoutingTable
impl Send for RoutingTable
impl Sync for RoutingTable
impl Unpin for RoutingTable
impl UnsafeUnpin for RoutingTable
impl !UnwindSafe for RoutingTable
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