#[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

source

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.

source

pub const fn as_ffi_ptr(&self) -> *const FfiDevicePath

Cast to a FfiDevicePath pointer.

source

pub const fn instance_iter(&self) -> DevicePathInstanceIterator<'_>

Get an iterator over the DevicePathInstances in this path.

source

pub const fn node_iter(&self) -> DevicePathNodeIterator<'_>

Get an iterator over the DevicePathNodes 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§

source§

impl Debug for DevicePath

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Identify for DevicePath

source§

const GUID: Guid = _

Unique protocol identifier.
source§

impl PartialEq<DevicePath> for DevicePath

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Pointee for DevicePathwhere [u8]: Pointee,

§

type Metadata = <[u8] as Pointee>::Metadata

The type for metadata in pointers and references to Self.
source§

impl ProtocolPointer for DevicePath

source§

unsafe fn ptr_from_ffi(ptr: *const c_void) -> *const Self

Create a const pointer to a Protocol from a c_void pointer. Read more
source§

unsafe fn mut_ptr_from_ffi(ptr: *mut c_void) -> *mut Self

Create a mutable pointer to a Protocol from a c_void pointer. Read more
source§

impl Eq for DevicePath

source§

impl Protocol for DevicePath

source§

impl StructuralEq for DevicePath

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more