Trait uefi::data_types::Identify[][src]

pub unsafe trait Identify {
    const GUID: Guid;
}
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.

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:

#[unsafe_guid("12345678-9abc-def0-1234-56789abcdef0")]
type Emptiness = ();

Associated Constants

const GUID: Guid[src]

Unique protocol identifier.

Implementors