We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c42d70f + 95a3cab commit 83f11caCopy full SHA for 83f11ca
uefi/src/proto/network/mod.rs
@@ -33,6 +33,20 @@ impl IpAddress {
33
pub const fn new_v6(ip_addr: [u8; 16]) -> Self {
34
Self(ip_addr)
35
}
36
+
37
+ #[must_use]
38
+ const fn as_raw_ptr(&self) -> *const uefi_raw::IpAddress {
39
+ // The uefi-raw type is defined differently, but the layout is
40
+ // compatible.
41
+ self.0.as_ptr().cast()
42
+ }
43
44
45
+ fn as_raw_ptr_mut(&mut self) -> *mut uefi_raw::IpAddress {
46
47
48
+ self.0.as_mut_ptr().cast()
49
50
51
52
impl From<core::net::Ipv4Addr> for IpAddress {
0 commit comments