Struct uefi::proto::device_path::DevicePath
source · #[repr(C, packed)]pub struct DevicePath { /* private fields */ }
Expand description
Device path protocol.
A device path contains one or more device path instances made of up
variable-length nodes. It ends with an END_ENTIRE
node.
See the module-level documentation for more details.
Implementations§
source§impl DevicePath
impl DevicePath
sourcepub unsafe fn from_ffi_ptr<'a>(ptr: *const FfiDevicePath) -> &'a DevicePath
pub unsafe fn from_ffi_ptr<'a>(ptr: *const FfiDevicePath) -> &'a DevicePath
Create a DevicePath
reference from an opaque pointer.
Safety
The input pointer must point to valid data. That data must
remain valid for the lifetime 'a
, and cannot be mutated during
that lifetime.
sourcepub const fn as_ffi_ptr(&self) -> *const FfiDevicePath
pub const fn as_ffi_ptr(&self) -> *const FfiDevicePath
Cast to a FfiDevicePath
pointer.
sourcepub const fn instance_iter(&self) -> DevicePathInstanceIterator<'_> ⓘ
pub const fn instance_iter(&self) -> DevicePathInstanceIterator<'_> ⓘ
Get an iterator over the DevicePathInstance
s in this path.
sourcepub const fn node_iter(&self) -> DevicePathNodeIterator<'_> ⓘ
pub const fn node_iter(&self) -> DevicePathNodeIterator<'_> ⓘ
Get an iterator over the DevicePathNode
s starting at
self
. Iteration ends when a path is reached where
is_end_entire
is true. That ending
path is not returned by the iterator.