File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ macro_rules! err {
2525
2626/// Attribute macro for marking structs as UEFI protocols.
2727///
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.
3030///
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. See the [`Protocol `] trait for details of how it is
33+ /// used .
3434///
3535/// # Safety
3636///
@@ -55,7 +55,7 @@ macro_rules! err {
5555/// assert_eq!(ExampleProtocol2::GUID, PROTO_GUID);
5656/// ```
5757///
58- /// [`Identify`]: https://docs.rs/uefi/latest/uefi/trait.Identify.html
58+ /// [`Identify`]: https://docs.rs/uefi/latest/uefi/data_types/ trait.Identify.html
5959/// [`Protocol`]: https://docs.rs/uefi/latest/uefi/proto/trait.Protocol.html
6060/// [send-and-sync]: https://doc.rust-lang.org/nomicon/send-and-sync.html
6161#[ proc_macro_attribute]
Original file line number Diff line number Diff line change @@ -34,10 +34,18 @@ pub use uefi_macros::unsafe_protocol;
3434use crate :: Identify ;
3535use core:: ffi:: c_void;
3636
37- /// Common trait implemented by all standard UEFI protocols.
37+ #[ cfg( doc) ]
38+ use crate :: boot;
39+
40+ /// Marker trait for structures that represent UEFI protocols.
41+ ///
42+ /// Implementing this trait allows a protocol to be opened with
43+ /// [`boot::open_protocol`] or [`boot::open_protocol_exclusive`]. Note that
44+ /// implementing this trait does not automatically install a protocol. To
45+ /// install a protocol, call [`boot::install_protocol_interface`].
3846///
39- /// You can derive the `Protocol` trait and specify the protocol's GUID using
40- /// the [`unsafe_protocol`] macro.
47+ /// As a convenience, you can derive the `Protocol` trait and specify the
48+ /// protocol's GUID using the [`unsafe_protocol`] macro.
4149///
4250/// # Example
4351///
You can’t perform that action at this time.
0 commit comments