pub struct Ipv6InetPair { /* private fields */ }
Expand description
InetPair
type representing a pair of IPv6 hosts within a network
Implementations§
source§impl Ipv6InetPair
impl Ipv6InetPair
sourcepub const fn new(
first: Ipv6Inet,
second: Ipv6Inet,
) -> Result<Self, InetTupleError>
pub const fn new( first: Ipv6Inet, second: Ipv6Inet, ) -> Result<Self, InetTupleError>
Create new pair from two addresses in the same network
Fails if the addresses are not in the same network.
sourcepub const fn new_from_addresses(
first: Ipv6Addr,
second: Ipv6Addr,
len: u8,
) -> Result<Self, InetTupleError>
pub const fn new_from_addresses( first: Ipv6Addr, second: Ipv6Addr, len: u8, ) -> Result<Self, InetTupleError>
Create new pair from two addresses and a common length
Fails if the network length is invalid for the addresses or the addresses are not in the same network.
sourcepub const fn network_length(&self) -> u8
pub const fn network_length(&self) -> u8
length in bits of the shared prefix of the contained addresses
sourcepub const fn iter(self) -> InetIterator<Ipv6Addr> ⓘ
pub const fn iter(self) -> InetIterator<Ipv6Addr> ⓘ
Iterate over first..=second
(inclusive)
Trait Implementations§
source§impl Clone for Ipv6InetPair
impl Clone for Ipv6InetPair
source§fn clone(&self) -> Ipv6InetPair
fn clone(&self) -> Ipv6InetPair
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Ipv6InetPair
impl Debug for Ipv6InetPair
source§impl Display for Ipv6InetPair
impl Display for Ipv6InetPair
source§impl From<Ipv6InetPair> for IpInetPair
impl From<Ipv6InetPair> for IpInetPair
source§fn from(c: Ipv6InetPair) -> Self
fn from(c: Ipv6InetPair) -> Self
Converts to this type from the input type.
source§impl Hash for Ipv6InetPair
impl Hash for Ipv6InetPair
source§impl InetPair for Ipv6InetPair
impl InetPair for Ipv6InetPair
source§fn new(first: Ipv6Inet, second: Ipv6Inet) -> Result<Self, InetTupleError>
fn new(first: Ipv6Inet, second: Ipv6Inet) -> Result<Self, InetTupleError>
Create new pair from two addresses in the same network Read more
source§fn new_from_addresses(
first: Self::Address,
second: Self::Address,
len: u8,
) -> Result<Self, InetTupleError>
fn new_from_addresses( first: Self::Address, second: Self::Address, len: u8, ) -> Result<Self, InetTupleError>
Create new pair from two addresses and a common length Read more
source§fn network_length(&self) -> u8
fn network_length(&self) -> u8
length in bits of the shared prefix of the contained addresses
source§impl IntoIterator for Ipv6InetPair
impl IntoIterator for Ipv6InetPair
Iterate over all the addresses in the CIDR.
source§impl PartialEq for Ipv6InetPair
impl PartialEq for Ipv6InetPair
impl Copy for Ipv6InetPair
impl Eq for Ipv6InetPair
impl StructuralPartialEq for Ipv6InetPair
Auto Trait Implementations§
impl Freeze for Ipv6InetPair
impl RefUnwindSafe for Ipv6InetPair
impl Send for Ipv6InetPair
impl Sync for Ipv6InetPair
impl Unpin for Ipv6InetPair
impl UnwindSafe for Ipv6InetPair
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
)