pub enum Prefix {
V4(Ipv4Prefix),
V6(Ipv6Prefix),
}Expand description
A prefix that can be either IPv4 or IPv6.
Variants§
Implementations§
Source§impl Prefix
impl Prefix
Sourcepub fn addr_string(&self) -> String
pub fn addr_string(&self) -> String
Return the network address as a string.
Sourcepub fn prefix_len(&self) -> u8
pub fn prefix_len(&self) -> u8
Return the prefix length.
Trait Implementations§
impl Copy for Prefix
impl Eq for Prefix
impl StructuralPartialEq for Prefix
Auto Trait Implementations§
impl Freeze for Prefix
impl RefUnwindSafe for Prefix
impl Send for Prefix
impl Sync for Prefix
impl Unpin for Prefix
impl UnsafeUnpin for Prefix
impl UnwindSafe for Prefix
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