Trait uefi::data_types::Identify
source · [−]Expand description
Several entities in the UEFI specification can be referred to by their GUID, this trait is a building block to interface them in uefi-rs.
You should never need to use the Identify
trait directly, but instead go
for more specific traits such as Protocol
or FileProtocolInfo
, which
indicate in which circumstances an Identify
-tagged type should be used.
Safety
Implementing Identify
is unsafe because attaching an incorrect GUID to a
type can lead to type unsafety on both the Rust and UEFI side.
You can derive Identify
for a type using the unsafe_guid
procedural
macro, which is exported by this module. This macro mostly works like a
custom derive, but also supports type aliases. It takes a GUID in canonical
textual format as an argument, and is used in the following way:
use uefi::unsafe_guid;
#[unsafe_guid("12345678-9abc-def0-1234-56789abcdef0")]
struct Emptiness;
Required Associated Constants
Implementors
impl Identify for Input
impl Identify for DebugSupport
impl Identify for DevicePath
impl Identify for DevicePathFromText
impl Identify for DevicePathToText
impl Identify for LoadedImage
impl Identify for BlockIO
impl Identify for DiskIo2
impl Identify for DiskIo
impl Identify for FileInfo
impl Identify for FileSystemInfo
impl Identify for FileSystemVolumeLabel
impl Identify for SimpleFileSystem
impl Identify for PartitionInfo
impl Identify for BaseCode
impl Identify for MpServices
impl Identify for Rng
impl Identify for MemoryProtection
impl Identify for ShimLock
target_arch="i386"
or x86-64 or ARM or AArch64 only.