Struct embassy_net::Ipv6Cidr
source · 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 = Cidr{
address: Address([255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 255, 0, 0, 0]),
prefix_len: 104,}
pub const SOLICITED_NODE_PREFIX: Cidr = Cidr{ address: Address([255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 255, 0, 0, 0]), prefix_len: 104,}
sourcepub const fn new(address: Address, prefix_len: u8) -> Cidr
pub const fn new(address: Address, 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: &Address) -> bool
pub fn contains_addr(&self, addr: &Address) -> 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 PartialEq<Cidr> for Cidr
impl PartialEq<Cidr> for Cidr
source§impl PartialOrd<Cidr> for Cidr
impl PartialOrd<Cidr> for Cidr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more