@@ -25,12 +25,14 @@ macro_rules! err {
25
25
26
26
/// Attribute macro for marking structs as UEFI protocols.
27
27
///
28
- /// The macro takes one argument, either a GUID string or the path to a `Guid`
29
- /// constant.
28
+ /// The macro can only be applied to a struct, and takes one argument, either a
29
+ /// GUID string or the path to a `Guid` constant.
30
30
///
31
- /// The macro can only be applied to a struct. It implements the
32
- /// [`Protocol`] trait and the `unsafe` [`Identify`] trait for the
33
- /// struct.
31
+ /// The macro implements the [`Protocol`] trait and the `unsafe` [`Identify`]
32
+ /// trait for the struct. This allows a protocol to be opened with
33
+ /// [`boot::open_protocol`] or [`boot::open_protocol_exclusive`]. Note that this
34
+ /// trait does not automatically install a protocol. To install a protocol, call
35
+ /// [`boot::install_protocol_interface`].
34
36
///
35
37
/// # Safety
36
38
///
@@ -55,9 +57,12 @@ macro_rules! err {
55
57
/// assert_eq!(ExampleProtocol2::GUID, PROTO_GUID);
56
58
/// ```
57
59
///
58
- /// [`Identify`]: https://docs.rs/uefi/latest/uefi/trait.Identify.html
60
+ /// [`Identify`]: https://docs.rs/uefi/latest/uefi/data_types/ trait.Identify.html
59
61
/// [`Protocol`]: https://docs.rs/uefi/latest/uefi/proto/trait.Protocol.html
60
62
/// [send-and-sync]: https://doc.rust-lang.org/nomicon/send-and-sync.html
63
+ /// [`boot::open_protocol`]: https://docs.rs/uefi/latest/uefi/boot/fn.open_protocol.html
64
+ /// [`boot::open_protocol_exclusive`]: https://docs.rs/uefi/latest/uefi/boot/fn.open_protocol_exclusive.html
65
+ /// [`boot::install_protocol_interface`]: https://docs.rs/uefi/latest/uefi/boot/fn.install_protocol_interface.html
61
66
#[ proc_macro_attribute]
62
67
pub fn unsafe_protocol ( args : TokenStream , input : TokenStream ) -> TokenStream {
63
68
let expr = parse_macro_input ! ( args as Expr ) ;
0 commit comments