Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bc365a1

Browse files
committed
device_path: add .data() accessor
1 parent a3e551c commit bc365a1

File tree

1 file changed

+6
-0
lines changed
  • uefi/src/proto/device_path

1 file changed

+6
-0
lines changed

‎uefi/src/proto/device_path/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ impl DevicePathNode {
176176
self.full_type() == (DeviceType::END, DeviceSubType::END_ENTIRE)
177177
}
178178

179+
/// True if this node ends an entire [`DevicePath`].
180+
#[must_use]
181+
pub fn data(&self) -> &[u8] {
182+
&self.data
183+
}
184+
179185
/// Convert from a generic [`DevicePathNode`] reference to an enum
180186
/// of more specific node types.
181187
pub fn as_enum(&self) -> Result<DevicePathNodeEnum, NodeConversionError> {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /