#[repr(C)]pub struct IpCidrAbi {
pub family: u32,
pub address: [u8; 16],
pub prefix_length: u8,
pub reserved: [u8; 3],
}Expand description
Plain-data payload mirror of IpCidr: same size (24 bytes) and
alignment (4) as the #[repr(C)] enum, but every byte pattern is a
valid value. Layout: family at offset 0 (a u32 tag), address at
offset 4 (16 bytes), prefix_length at offset 20, reserved at offset
21 (3 bytes, must be zero). family is 0 for IPv4 and 1 for IPv6;
any other value, a non-zero reserved, a prefix length above 32 (IPv4)
or 128 (IPv6), or non-zero bytes in the trailing 12 address bytes of an
IPv4 address is rejected with InvalidArgument.
Fields§
§family: u32§address: [u8; 16]§prefix_length: u8§reserved: [u8; 3]Trait Implementations§
impl Copy for IpCidrAbi
impl Eq for IpCidrAbi
impl PlainData for IpCidrAbi
impl StructuralPartialEq for IpCidrAbi
Auto Trait Implementations§
impl Freeze for IpCidrAbi
impl RefUnwindSafe for IpCidrAbi
impl Send for IpCidrAbi
impl Sync for IpCidrAbi
impl Unpin for IpCidrAbi
impl UnsafeUnpin for IpCidrAbi
impl UnwindSafe for IpCidrAbi
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