#[repr(C)]
pub union IpAddress {
pub addr: [u32; 4],
pub v4: Ipv4Address,
pub v6: Ipv6Address,
}
Expand description
An IPv4 or IPv6 internet protocol address.
Corresponds to the EFI_IP_ADDRESS
type in the UEFI specification. This
type is defined in the same way as edk2 for compatibility with C code. Note
that this is an untagged union, so there’s no way to tell which type of
address an IpAddress
value contains without additional context.
Fields§
§addr: [u32; 4]
This member serves to align the whole type to a 4 bytes as required by
the spec. Note that this is slightly different from repr(align(4))
,
which would prevent placing this type in a packed structure.
v4: Ipv4Address
An IPv4 internet protocol address.
v6: Ipv6Address
An IPv6 internet protocol address.
Implementations§
Trait Implementations§
impl Copy for IpAddress
Auto Trait Implementations§
impl Freeze for IpAddress
impl RefUnwindSafe for IpAddress
impl Send for IpAddress
impl Sync for IpAddress
impl Unpin for IpAddress
impl UnwindSafe for IpAddress
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
)