pub struct Range { /* private fields */ }Expand description
An inclusive address range within one family. Always valid: start <= end,
both within the family’s address space.
Implementations§
Source§impl Range
impl Range
Sourcepub fn new(family: Family, start: u128, end: u128) -> Option<Self>
pub fn new(family: Family, start: u128, end: u128) -> Option<Self>
A range of numeric addresses; None unless start <= end and both fit
the family (IPv4 values must be at most u32::MAX).
Sourcepub fn from_ips(a: IpAddr, b: IpAddr) -> Option<Self>
pub fn from_ips(a: IpAddr, b: IpAddr) -> Option<Self>
The range between two addresses of the same family, in either order.
pub fn family(&self) -> Family
Trait Implementations§
impl Copy for Range
impl Eq for Range
impl StructuralPartialEq for Range
Auto Trait Implementations§
impl Freeze for Range
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnsafeUnpin for Range
impl UnwindSafe for Range
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