[−][src]Trait rtable::prefix::Prefixable
Trait Prefixable.
Required methods
fn from_prefix(p: &Self) -> Self
Construct a prefix from given prefix.
fn from_common(prefix1: &Self, prefix2: &Self) -> Self
Construct a prefix from common parts of two prefixes.
fn len(&self) -> u8
Return prefix length.
fn octets(&self) -> &[u8]
Return reference of slice to address.
fn octets_mut(&mut self) -> &mut [u8]
Return mutable reference of slice to address.
Provided methods
fn bit_at(&self, index: u8) -> u8
Return 0 or 1 at certain position of bit in the prefix.
fn contains(&self, prefix: &Self) -> bool
Return true if given prefix is included in this prefix.
Implementors
impl<T: Addressable> Prefixable for Prefix<T>
[src]
fn from_prefix(p: &Self) -> Self
[src]
Construct a prefix from given prefix.
fn from_common(prefix1: &Self, prefix2: &Self) -> Self
[src]
Construct a prefix from common parts of two prefixes, assuming p1 is shorter than p2.
fn len(&self) -> u8
[src]
Return prefix length.
fn octets(&self) -> &[u8]
[src]
Return reference of slice to address.
fn octets_mut(&mut self) -> &mut [u8]
[src]
Return mutable reference of slice to address.