#[repr(C)]pub struct DriverHandle(/* private fields */);
Expand description
A handle representing some resource managed by the driver runtime.
Implementations§
Source§impl DriverHandle
impl DriverHandle
Sourcepub unsafe fn new_unchecked(handle: NonZero<fdf_handle_t>) -> Self
pub unsafe fn new_unchecked(handle: NonZero<fdf_handle_t>) -> Self
Constructs a DriverHandle
for the given fdf_handle_t
§Safety
The caller is responsible for ensuring that the handle given is a valid driver handle:
- It has the marker bits set correctly
- It is not “owned” elsewhere
Sourcepub fn as_handle_ref(&self) -> DriverHandleRef<'_>
pub fn as_handle_ref(&self) -> DriverHandleRef<'_>
Gets a DriverHandleRef
of this handle
Sourcepub unsafe fn get_raw(&self) -> NonZero<fdf_handle_t>
pub unsafe fn get_raw(&self) -> NonZero<fdf_handle_t>
Gets the raw handle object
§Safety
The caller must be sure to not let this handle outlive the lifetime of the object it came from.
Sourcepub fn into_raw(self) -> NonZero<fdf_handle_t>
pub fn into_raw(self) -> NonZero<fdf_handle_t>
Turns this handle into its raw handle number, without dropping the handle.
The caller is responsible for ensuring that the handle is released or reconstituted
into a DriverHandle
.
Trait Implementations§
Source§impl Debug for DriverHandle
impl Debug for DriverHandle
Source§impl Drop for DriverHandle
impl Drop for DriverHandle
Source§impl From<DriverHandle> for MixedHandle
impl From<DriverHandle> for MixedHandle
Source§fn from(value: DriverHandle) -> Self
fn from(value: DriverHandle) -> Self
Converts to this type from the input type.
Source§impl Hash for DriverHandle
impl Hash for DriverHandle
Source§impl Ord for DriverHandle
impl Ord for DriverHandle
Source§fn cmp(&self, other: &DriverHandle) -> Ordering
fn cmp(&self, other: &DriverHandle) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DriverHandle
impl PartialEq for DriverHandle
Source§impl PartialOrd for DriverHandle
impl PartialOrd for DriverHandle
impl Eq for DriverHandle
impl StructuralPartialEq for DriverHandle
Auto Trait Implementations§
impl Freeze for DriverHandle
impl RefUnwindSafe for DriverHandle
impl Send for DriverHandle
impl Sync for DriverHandle
impl Unpin for DriverHandle
impl UnwindSafe for DriverHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more