pub struct IpRange {
pub base: IpAddr,
pub prefix_len: u8,
}Expand description
CIDR-like IPv4/IPv6 range, interpreted inclusively.
A minimal self-build (no ipnet dep, to keep the safety footprint
small). Prefix length in host bits: IPv4 up to 32, IPv6
up to 128. Parsing (e.g. from "10.0.0.0/24") arrives in RC1
(governance XML); here the struct form suffices.
Fields§
§base: IpAddrBase address of the range (host bits are ignored).
prefix_len: u8Prefix length in bits. Must be <= 32 for v4, <= 128 for v6.
Implementations§
Trait Implementations§
impl Eq for IpRange
impl StructuralPartialEq for IpRange
Auto Trait Implementations§
impl Freeze for IpRange
impl RefUnwindSafe for IpRange
impl Send for IpRange
impl Sync for IpRange
impl Unpin for IpRange
impl UnsafeUnpin for IpRange
impl UnwindSafe for IpRange
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