#[repr(C)]pub struct ULockApi {
pub ulock_wait: ULockWaitFn,
pub ulock_wake: ULockWakeFn,
}Expand description
A dynamically loaded pair of function pointers implementing the API.
This can be returned by ULockApi::get(). Note that unless you can cache
the API reference somewhere easily, it’s a bit more efficient to call
weak::ulock_wait and/or weak::ulock_wake
directly.
Fields§
§ulock_wait: ULockWaitFnFunction pointer to __ulock_wait.
ulock_wake: ULockWakeFnFunction pointer to __ulock_wake.
Implementations§
Source§impl ULockApi
impl ULockApi
Sourcepub fn get() -> Result<&'static Self, ApiUnsupported>
pub fn get() -> Result<&'static Self, ApiUnsupported>
Get a reference to the API, if supported, loading it if not already
loaded. This function is relatively fast for non-first time loads (which
should be rare), but it’s still likely (very slightly) better to call
ulock_wait or ulock_wake unless you cache it somewhere quite
cheap to access.
Trait Implementations§
impl Copy for ULockApi
impl StructuralPartialEq for ULockApi
Auto Trait Implementations§
impl Freeze for ULockApi
impl RefUnwindSafe for ULockApi
impl Send for ULockApi
impl Sync for ULockApi
impl Unpin for ULockApi
impl UnwindSafe for ULockApi
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