Struct default_net::ip::Ipv6Net
source · pub struct Ipv6Net {
pub addr: Ipv6Addr,
pub prefix_len: u8,
pub netmask: Ipv6Addr,
}
Expand description
Structure of IPv6 Network
Fields§
§addr: Ipv6Addr
IPv6 Address
prefix_len: u8
Prefix Length
netmask: Ipv6Addr
Network Mask
Implementations§
source§impl Ipv6Net
impl Ipv6Net
sourcepub fn new(ipv6_addr: Ipv6Addr, prefix_len: u8) -> Ipv6Net
pub fn new(ipv6_addr: Ipv6Addr, prefix_len: u8) -> Ipv6Net
Construct a new Ipv6Net instance from IPv6 Address and Prefix Length
sourcepub fn new_with_netmask(ipv6_addr: Ipv6Addr, netmask: Ipv6Addr) -> Ipv6Net
pub fn new_with_netmask(ipv6_addr: Ipv6Addr, netmask: Ipv6Addr) -> Ipv6Net
Construct a new Ipv6Net instance from IPv6 Address and Network Mask
sourcepub const fn max_prefix_len(&self) -> u8
pub const fn max_prefix_len(&self) -> u8
Returns the maximum valid prefix length.
Trait Implementations§
source§impl Ord for Ipv6Net
impl Ord for Ipv6Net
source§impl PartialEq for Ipv6Net
impl PartialEq for Ipv6Net
source§impl PartialOrd for Ipv6Net
impl PartialOrd for Ipv6Net
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 moreimpl Copy for Ipv6Net
impl Eq for Ipv6Net
impl StructuralPartialEq for Ipv6Net
Auto Trait Implementations§
impl RefUnwindSafe for Ipv6Net
impl Send for Ipv6Net
impl Sync for Ipv6Net
impl Unpin for Ipv6Net
impl UnwindSafe for Ipv6Net
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