pub struct Ipv6Cidr { /* private fields */ }
Expand description
A specification of an IPv6 CIDR block, containing an address and a variable-length subnet masking prefix length.
Implementations§
Source§impl Cidr
impl Cidr
Sourcepub const SOLICITED_NODE_PREFIX: Cidr = _
pub const SOLICITED_NODE_PREFIX: Cidr = _
Sourcepub const fn new(address: Ipv6Addr, prefix_len: u8) -> Cidr
pub const fn new(address: Ipv6Addr, prefix_len: u8) -> Cidr
Create an IPv6 CIDR block from the given address and prefix length.
§Panics
This function panics if the prefix length is larger than 128.
Sourcepub const fn prefix_len(&self) -> u8
pub const fn prefix_len(&self) -> u8
Return the prefix length of this IPv6 CIDR block.
Sourcepub fn contains_addr(&self, addr: &Ipv6Addr) -> bool
pub fn contains_addr(&self, addr: &Ipv6Addr) -> bool
Query whether the subnetwork described by this IPv6 CIDR block contains the given address.
Sourcepub fn contains_subnet(&self, subnet: &Cidr) -> bool
pub fn contains_subnet(&self, subnet: &Cidr) -> bool
Query whether the subnetwork described by this IPV6 CIDR block contains the subnetwork described by the given IPv6 CIDR block.
Trait Implementations§
Source§impl Ord for Cidr
impl Ord for Cidr
Source§impl PartialOrd for Cidr
impl PartialOrd for Cidr
impl Copy for Cidr
impl Eq for Cidr
impl StructuralPartialEq for Cidr
Auto Trait Implementations§
impl Freeze for Cidr
impl RefUnwindSafe for Cidr
impl Send for Cidr
impl Sync for Cidr
impl Unpin for Cidr
impl UnwindSafe for Cidr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)