Trait uefi::proto::media::file::FromUefi[][src]

pub trait FromUefi {
    unsafe fn from_uefi<'ptr>(ptr: *mut c_void) -> &'ptr mut Self;
}
Expand description

Trait for going from an UEFI-originated pointer to a Rust reference

This is trivial for Sized types, but requires some work when operating on dynamic-sized types like NamedFileProtocolInfo, as the second member of the fat pointer must be reconstructed using hidden UEFI-provided metadata.

Required methods

unsafe fn from_uefi<'ptr>(ptr: *mut c_void) -> &'ptr mut Self[src]

Turn an UEFI-provided pointer-to-base into a (possibly fat) Rust reference

Safety

This function can lead to undefined behavior if the given pointer is not pointing to a valid object of the specified type.

Implementors

impl<Header> FromUefi for NamedFileProtocolInfo<Header>[src]

unsafe fn from_uefi<'ptr>(ptr: *mut c_void) -> &'ptr mut Self[src]