1 pub use uguid::Guid; 2 3 /// Several entities in the UEFI specification can be referred to by their GUID, 4 /// this trait is a building block to interface them in uefi-rs. 5 /// 6 /// You should never need to use the `Identify` trait directly, but instead go 7 /// for more specific traits such as [`Protocol`] or [`FileProtocolInfo`], which 8 /// indicate in which circumstances an `Identify`-tagged type should be used. 9 /// 10 /// For the common case of implementing this trait for a protocol, use 11 /// the [`unsafe_protocol`] macro. 12 /// 13 /// # Safety 14 /// 15 /// Implementing `Identify` is unsafe because attaching an incorrect GUID to a 16 /// type can lead to type unsafety on both the Rust and UEFI side. 17 /// 18 /// [`Protocol`]: crate::proto::Protocol 19 /// [`FileProtocolInfo`]: crate::proto::media::file::FileProtocolInfo 20 /// [`unsafe_protocol`]: crate::proto::unsafe_protocol 21 pub unsafe trait Identify { 22 /// Unique protocol identifier. 23 const GUID: Guid; 24 } 25