Skip to content

Commit 8192ea4

Browse files
committed
uefi-raw: improve protocol module documentation
1 parent e3d5afb commit 8192ea4

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

uefi-raw/src/protocol/mod.rs

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,26 @@
22

33
//! Protocol definitions.
44
//!
5-
//! Protocols are sets of related functionality identified by a unique
6-
//! ID. They can be implemented by a UEFI driver or occasionally by a
7-
//! UEFI application.
5+
//! # TL;DR
6+
//! Technically, a protocol is a `C` struct holding functions and/or data, with
7+
//! an associated [`GUID`].
8+
//!
9+
//! # About
10+
//! UEFI protocols are a structured collection of functions and/or data,
11+
//! identified by a [`GUID`], which defines an interface between components in
12+
//! the UEFI environment, such as between drivers, applications, or firmware
13+
//! services.
14+
//!
15+
//! Protocols are central to UEFI’s handle-based object model, and they provide
16+
//! a clean, extensible way for components to discover and use services from one
17+
//! another.
18+
//!
19+
//! Implementation-wise, a protocol is a `C` struct holding function pointers
20+
//! and/or data. Please note that some protocols may use [`core::ptr::null`] as
21+
//! interface. For example, the device path protocol can be implemented but
22+
//! return `null`.
23+
//!
24+
//! [`GUID`]: crate::Guid
825
926
pub mod ata;
1027
pub mod block;

0 commit comments

Comments
 (0)