Struct uefi::proto::device_path::DevicePath
source · #[repr(C, packed(1))]pub struct DevicePath { /* private fields */ }
Expand description
Device path protocol.
Can be used on any device handle to obtain generic path/location information concerning the physical device or logical device. If the handle does not logically map to a physical device, the handle may not necessarily support the device path protocol. The device path describes the location of the device the handle is for. The size of the Device Path can be determined from the structures that make up the Device Path.
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.
sourcepub fn to_boxed(&self) -> Box<Self>
Available on crate feature alloc
only.
pub fn to_boxed(&self) -> Box<Self>
alloc
only.Returns a boxed copy of that value.
sourcepub fn to_string(
&self,
bs: &BootServices,
display_only: DisplayOnly,
allow_shortcuts: AllowShortcuts
) -> Result<CString16, DevicePathToTextError>
Available on crate feature alloc
only.
pub fn to_string( &self, bs: &BootServices, display_only: DisplayOnly, allow_shortcuts: AllowShortcuts ) -> Result<CString16, DevicePathToTextError>
alloc
only.Transforms the device path to its string representation using the
DevicePathToText
protocol.
Trait Implementations§
source§impl Debug for DevicePath
impl Debug for DevicePath
source§impl Identify for DevicePath
impl Identify for DevicePath
source§impl PartialEq for DevicePath
impl PartialEq for DevicePath
source§impl Pointee for DevicePath
impl Pointee for DevicePath
source§impl ProtocolPointer for DevicePath
impl ProtocolPointer for DevicePath
source§impl ToOwned for DevicePath
Available on crate feature alloc
only.
impl ToOwned for DevicePath
alloc
only.