pub struct Ipv4Net {
pub addr: u32,
pub prefix: u8,
}Expand description
An IPv4 prefix. Small, because the whole need is “are these two addresses in the same /22”, and a CIDR crate is a dependency for one comparison.
Fields§
§addr: u32§prefix: u8Implementations§
Trait Implementations§
impl Copy for Ipv4Net
impl Eq for Ipv4Net
impl StructuralPartialEq for Ipv4Net
Auto Trait Implementations§
impl Freeze for Ipv4Net
impl RefUnwindSafe for Ipv4Net
impl Send for Ipv4Net
impl Sync for Ipv4Net
impl Unpin for Ipv4Net
impl UnsafeUnpin for Ipv4Net
impl UnwindSafe for Ipv4Net
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