pub struct IpLCTrieSet {
pub ipv4: Ipv4LCTrieSet,
pub ipv6: Ipv6LCTrieSet,
}Expand description
A LC-trie set that mix both Ipv4 and Ipv6 prefixes
Fields§
§ipv4: Ipv4LCTrieSet§ipv6: Ipv6LCTrieSetImplementations§
Source§impl IpLCTrieSet
impl IpLCTrieSet
Sourcepub fn len(&self) -> NonZeroUsize
pub fn len(&self) -> NonZeroUsize
Returns the size of the set.
Notice that it always greater or equals two since two top prefixes are always present in the map (one for Ipv4 and the other for Ipv6)
Sourcepub fn get(&self, ipnet: &IpNet) -> Option<IpNet>
pub fn get(&self, ipnet: &IpNet) -> Option<IpNet>
Gets the value associated with an exact match of the key.
To access to the longest prefix match, use Self::lookup.
Trait Implementations§
Source§impl FromIterator<IpNet> for IpLCTrieSet
impl FromIterator<IpNet> for IpLCTrieSet
Auto Trait Implementations§
impl Freeze for IpLCTrieSet
impl RefUnwindSafe for IpLCTrieSet
impl Send for IpLCTrieSet
impl Sync for IpLCTrieSet
impl Unpin for IpLCTrieSet
impl UnwindSafe for IpLCTrieSet
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