|
37 | 37 | //! |
38 | 38 | //! # Types |
39 | 39 | //! |
40 | | -//! To represent device paths, this module provides several types: |
| 40 | +//! This module defines several types used to represent device paths. |
| 41 | +//! For constructing device paths, see the [`build`] module. |
41 | 42 | //! |
42 | 43 | //! * [`DevicePath`] is the root type that represents a full device |
43 | 44 | //! path, containing one or more device path instance. It ends with an |
|
80 | 81 | //! Note: the API provided by this module is currently mostly limited to |
81 | 82 | //! reading existing device paths rather than constructing new ones. |
82 | 83 | //! |
| 84 | +//! # Submodules |
| 85 | +//! |
| 86 | +//! - utilities to construct device paths: [`build`] |
| 87 | +//! - utilities to transform device paths to a textual representation: [`text`] |
| 88 | +//! - DevicePathUtilities protocol:: [`util`] |
| 89 | +//! |
| 90 | +//! |
83 | 91 | //! [`END_ENTIRE`]: DeviceSubType::END_ENTIRE |
84 | 92 | //! [`END_INSTANCE`]: DeviceSubType::END_INSTANCE |
85 | 93 | //! [`Protocol`]: crate::proto::Protocol |
@@ -343,9 +351,14 @@ impl<'a> TryFrom<&'a [u8]> for &'a DevicePathNode { |
343 | 351 | } |
344 | 352 | } |
345 | 353 |
|
346 | | -/// A single device path instance that ends with either an [`END_INSTANCE`] |
347 | | -/// or [`END_ENTIRE`] node. Use [`DevicePath::instance_iter`] to get the |
348 | | -/// path instances in a [`DevicePath`]. |
| 354 | +/// A single device path instance within a fully-qualified [`DevicePath`], which |
| 355 | +/// ends with either an [`END_INSTANCE`] or [`END_ENTIRE`] node. |
| 356 | +/// |
| 357 | +/// An instance is one of possibly multiple complete route to the target, e.g., |
| 358 | +/// a file can be located via network device one or two. |
| 359 | +/// |
| 360 | +/// Use [`DevicePath::instance_iter`] to get the path instances in a |
| 361 | +/// [`DevicePath`]. |
349 | 362 | /// |
350 | 363 | /// See the [module-level documentation] for more details. |
351 | 364 | /// |
@@ -411,11 +424,16 @@ impl ToOwned for DevicePathInstance { |
411 | 424 | } |
412 | 425 | } |
413 | 426 |
|
414 | | -/// High-level representation of the UEFI [device path protocol]. |
| 427 | +/// High-level representation of the UEFI [device path protocol], often simply |
| 428 | +/// referred to as "device path". |
415 | 429 | /// |
416 | 430 | /// This type represents an entire device path, possibly consisting of multiple |
417 | 431 | /// [`DevicePathInstance`]s and [`DevicePathNode`]s. |
418 | 432 | /// |
| 433 | +/// Further, this Rust type is a DST and therefore typically exists as reference |
| 434 | +/// to parse underlying data correspondingly. To get an owned device path, you |
| 435 | +/// can use [`DevicePath::to_owned`]. |
| 436 | +/// |
419 | 437 | /// See the [module-level documentation] for more details. |
420 | 438 | /// |
421 | 439 | /// # Usage |
|
0 commit comments