Struct uefi::proto::device_path::DevicePathInstance

source ·
#[repr(C, packed(1))]
pub struct DevicePathInstance { /* private fields */ }
Expand description

A single device path instance that ends with either an END_INSTANCE or END_ENTIRE node. Use DevicePath::instance_iter to get the path instances in a DevicePath.

See the module-level documentation for more details.

Implementations§

source§

impl DevicePathInstance

source

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

Get an iterator over the DevicePathNodes in this instance. Iteration ends when any DeviceType::END node is reached.

source

pub const fn as_bytes(&self) -> &[u8]

Returns a slice of the underlying bytes.

source

pub fn to_boxed(&self) -> Box<Self>

Available on crate feature alloc only.

Returns a boxed copy of that value.

Trait Implementations§

source§

impl Debug for DevicePathInstance

source§

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

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

impl PartialEq for DevicePathInstance

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 DevicePathInstance
where [u8]: Pointee,

§

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

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

impl ToOwned for DevicePathInstance

Available on crate feature alloc only.
§

type Owned = Box<DevicePathInstance>

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl Eq for DevicePathInstance

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more