Skip to main content

RouteTable

Trait RouteTable 

Source
pub trait RouteTable {
Show 16 methods // Required methods fn capacity(&self) -> usize; fn len(&self) -> usize; fn destinations(&self) -> &[DestinationHash]; fn hops(&self) -> &[u8] ; fn learned_at(&self) -> &[InstantMillis]; fn last_relayed_at(&self) -> &[InstantMillis]; fn responsiveness(&self) -> &[RouteResponsiveness]; fn receiving_interfaces(&self) -> &[InterfaceId]; fn next_hops(&self) -> &[NextHop]; fn set_row(&mut self, i: usize, row: RouteEntry); fn push( &mut self, destination: DestinationHash, row: RouteEntry, ) -> Result<usize, TablePushError>; fn swap_remove(&mut self, i: usize, last: usize); // Provided methods fn is_empty(&self) -> bool { ... } fn index_of(&self, destination: &DestinationHash) -> Option<usize> { ... } fn route_count_via(&self, interface: InterfaceId) -> usize { ... } fn repoint_receiving_interface( &mut self, previous: InterfaceId, current: InterfaceId, now: InstantMillis, ) -> usize { ... }
}

Required Methods§

Source

fn capacity(&self) -> usize

Source

fn len(&self) -> usize

Source

fn destinations(&self) -> &[DestinationHash]

Source

fn hops(&self) -> &[u8]

Source

fn learned_at(&self) -> &[InstantMillis]

Source

fn last_relayed_at(&self) -> &[InstantMillis]

Source

fn responsiveness(&self) -> &[RouteResponsiveness]

Source

fn receiving_interfaces(&self) -> &[InterfaceId]

Source

fn next_hops(&self) -> &[NextHop]

Source

fn set_row(&mut self, i: usize, row: RouteEntry)

Source

fn push( &mut self, destination: DestinationHash, row: RouteEntry, ) -> Result<usize, TablePushError>

Source

fn swap_remove(&mut self, i: usize, last: usize)

Provided Methods§

Source

fn is_empty(&self) -> bool

Source

fn index_of(&self, destination: &DestinationHash) -> Option<usize>

Source

fn route_count_via(&self, interface: InterfaceId) -> usize

Source

fn repoint_receiving_interface( &mut self, previous: InterfaceId, current: InterfaceId, now: InstantMillis, ) -> usize

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<const MAX_TRACKED_DESTINATIONS: usize> RouteTable for FixedArrayRouteTable<MAX_TRACKED_DESTINATIONS>

Source§

impl<const N: usize, const BUCKETS: usize, A> RouteTable for FixedHeapRouteTable<N, BUCKETS, A>
where A: Allocator,

Source§

impl<const N: usize, const BUCKETS: usize> RouteTable for FixedIndexedRouteTable<N, BUCKETS>