pub struct SimpleTable<Node> { /* private fields */ }Expand description
Simple routing table that doesn’t segregate IPv4 and IPv6 routes.
The prefix 8.0.0.0/8 is treated equivalently to 0800::/8 by this table.
You most likely want SplitStackTable if you’re
operating in a dual-IP-stack environment.
Implementations§
Source§impl<Node> SimpleTable<Node>
impl<Node> SimpleTable<Node>
Trait Implementations§
Source§impl<Node: Clone> Clone for SimpleTable<Node>
impl<Node: Clone> Clone for SimpleTable<Node>
Source§fn clone(&self) -> SimpleTable<Node>
fn clone(&self) -> SimpleTable<Node>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<Node: Copy> Copy for SimpleTable<Node>
Source§impl<Node: Debug> Debug for SimpleTable<Node>
impl<Node: Debug> Debug for SimpleTable<Node>
Source§impl<Node: Default> Default for SimpleTable<Node>
impl<Node: Default> Default for SimpleTable<Node>
Source§fn default() -> SimpleTable<Node>
fn default() -> SimpleTable<Node>
Returns the “default value” for a type. Read more
impl<Node: Eq> Eq for SimpleTable<Node>
Source§impl<Node: Hash> Hash for SimpleTable<Node>
impl<Node: Hash> Hash for SimpleTable<Node>
Source§impl<Node: PartialEq> PartialEq for SimpleTable<Node>
impl<Node: PartialEq> PartialEq for SimpleTable<Node>
Source§fn eq(&self, other: &SimpleTable<Node>) -> bool
fn eq(&self, other: &SimpleTable<Node>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<Node> RoutingTable for SimpleTable<Node>where
Node: StrideOps,
impl<Node> RoutingTable for SimpleTable<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> StructuralPartialEq for SimpleTable<Node>
Auto Trait Implementations§
impl<Node> Freeze for SimpleTable<Node>where
Node: Freeze,
impl<Node> RefUnwindSafe for SimpleTable<Node>where
Node: RefUnwindSafe,
impl<Node> Send for SimpleTable<Node>where
Node: Send,
impl<Node> Sync for SimpleTable<Node>where
Node: Sync,
impl<Node> Unpin for SimpleTable<Node>where
Node: Unpin,
impl<Node> UnsafeUnpin for SimpleTable<Node>where
Node: UnsafeUnpin,
impl<Node> UnwindSafe for SimpleTable<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