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

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

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

pub 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.

Loading content...

Implementors

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

Loading content...