pub struct SplitStackTable<Node> { /* private fields */ }Expand description
Routing table that segregates routes into independent IPv4 and IPv6 tables.
This is likely the kind of table you want unless you know you’ll be operating in an exclusively-single-stack environment and want to save the slight runtime overhead of discriminating on address type.
Implementations§
Source§impl<T, C> SplitStackTable<Node<T, C>>
impl<T, C> SplitStackTable<Node<T, C>>
Source§impl<Node> SplitStackTable<Node>where
Node: StrideOps,
impl<Node> SplitStackTable<Node>where
Node: StrideOps,
Trait Implementations§
Source§impl<Node: Clone> Clone for SplitStackTable<Node>
impl<Node: Clone> Clone for SplitStackTable<Node>
impl<Node: Copy> Copy for SplitStackTable<Node>
Source§impl<Node: Debug> Debug for SplitStackTable<Node>
impl<Node: Debug> Debug for SplitStackTable<Node>
Source§impl<Node: Default> Default for SplitStackTable<Node>
impl<Node: Default> Default for SplitStackTable<Node>
impl<Node: Eq> Eq for SplitStackTable<Node>
Source§impl<Node: Hash> Hash for SplitStackTable<Node>
impl<Node: Hash> Hash for SplitStackTable<Node>
Source§impl<Node: PartialEq> PartialEq for SplitStackTable<Node>
impl<Node: PartialEq> PartialEq for SplitStackTable<Node>
Source§impl<Node> RoutingTable for SplitStackTable<Node>where
Node: StrideOps,
impl<Node> RoutingTable for SplitStackTable<Node>where
Node: StrideOps,
Source§type Value = <Node as StrideBase>::T
type Value = <Node as StrideBase>::T
The value stored in each route.
Source§fn contains(&self, ip: IpAddr) -> bool
fn contains(&self, ip: IpAddr) -> bool
Report whether
ip is covered by a route in the table. Read moreSource§fn insert(&mut self, prefix: IpNet, val: Node::T) -> Option<Node::T>
fn insert(&mut self, prefix: IpNet, val: Node::T) -> Option<Node::T>
Insert a route into the table at
prefix. Read moreSource§fn remove(&mut self, prefix: IpNet) -> Option<Node::T>
fn remove(&mut self, prefix: IpNet) -> Option<Node::T>
Remove the route from the table with the given
prefix. Read moreSource§fn lookup(&self, ip: IpAddr) -> Option<&Node::T>
fn lookup(&self, ip: IpAddr) -> Option<&Node::T>
Lookup the route that most closely covers
ip. Read moreSource§fn lookup_all(&self, ip: IpAddr) -> LookupIter<'_, Self::Value> ⓘ
fn lookup_all(&self, ip: IpAddr) -> LookupIter<'_, Self::Value> ⓘ
Lookup all matches that cover
ip. Read moreSource§fn lookup_prefix_exact(&self, prefix: IpNet) -> Option<&Node::T>
fn lookup_prefix_exact(&self, prefix: IpNet) -> Option<&Node::T>
Lookup a route that exactly matches
prefix (supernets do not match). Read moreSource§fn lookup_prefix(&self, prefix: IpNet) -> Option<&Node::T>
fn lookup_prefix(&self, prefix: IpNet) -> Option<&Node::T>
Lookup the route that most closely covers
prefix. Read moreimpl<Node: PartialEq> StructuralPartialEq for SplitStackTable<Node>
Auto Trait Implementations§
impl<Node> Forget for SplitStackTable<Node>
impl<Node> Freeze for SplitStackTable<Node>where
Node: Freeze,
impl<Node> Move for SplitStackTable<Node>
impl<Node> RefUnwindSafe for SplitStackTable<Node>where
Node: RefUnwindSafe,
impl<Node> Send for SplitStackTable<Node>where
Node: Send,
impl<Node> Sync for SplitStackTable<Node>where
Node: Sync,
impl<Node> Unpin for SplitStackTable<Node>where
Node: Unpin,
impl<Node> UnsafeUnpin for SplitStackTable<Node>where
Node: UnsafeUnpin,
impl<Node> UnwindSafe for SplitStackTable<Node>where
Node: UnwindSafe,
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