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
sourceimpl 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 fn as_ffi_ptr(&self) -> *const FfiDevicePath
pub fn as_ffi_ptr(&self) -> *const FfiDevicePath
Cast to a FfiDevicePath
pointer.
sourcepub fn instance_iter(&self) -> DevicePathInstanceIterator<'_>ⓘNotable traits for DevicePathInstanceIterator<'a>impl<'a> Iterator for DevicePathInstanceIterator<'a> type Item = &'a DevicePathInstance;
pub fn instance_iter(&self) -> DevicePathInstanceIterator<'_>ⓘNotable traits for DevicePathInstanceIterator<'a>impl<'a> Iterator for DevicePathInstanceIterator<'a> type Item = &'a DevicePathInstance;
Get an iterator over the DevicePathInstance
s in this path.
sourcepub fn node_iter(&self) -> DevicePathNodeIterator<'_>ⓘNotable traits for DevicePathNodeIterator<'a>impl<'a> Iterator for DevicePathNodeIterator<'a> type Item = &'a DevicePathNode;
pub fn node_iter(&self) -> DevicePathNodeIterator<'_>ⓘNotable traits for DevicePathNodeIterator<'a>impl<'a> Iterator for DevicePathNodeIterator<'a> type Item = &'a DevicePathNode;
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.
Trait Implementations
sourceimpl Debug for DevicePath
impl Debug for DevicePath
sourceimpl PartialEq<DevicePath> for DevicePath
impl PartialEq<DevicePath> for DevicePath
sourcefn eq(&self, other: &DevicePath) -> bool
fn eq(&self, other: &DevicePath) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more