[−][src]Struct sunrise_libuser::types::HandleRef
A fake reference to a Handle. Has the same representation as a real Handle, but is bound to the real handle's lifetime.
This pattern allows for passing handle arrays without giving up ownership of the handle, and without an expensive conversion from an array of pointers to an array of handles.
Fields
inner: NonZeroU32
The underlying handle number.
lifetime: PhantomData<&'a Handle>
The real handle this reference is tied to.
Implementations
impl<'a> HandleRef<'a>
[src]
pub fn staticify(self) -> HandleRef<'static>
[src]
Remove the lifetime on the current HandleRef. See Handle::as_ref_static() for more information on the safety of this operation.
pub fn wait_async(
self,
queue: WorkQueue
) -> impl Future<Output = Result<(), Error>> + Unpin
[src]
self,
queue: WorkQueue
) -> impl Future<Output = Result<(), Error>> + Unpin
Returns a future that waits for the current handle to get signaled. This effectively registers the currently executing Task to be polled again by the future executor backing the given WorkQueue when this handle gets signaled.
Panics
Panics if used from outside the context of a Future spawned on a libuser future executor. Please make sure you only call this function from a future spawned on a WaitableManager.
Trait Implementations
impl<'a> Clone for HandleRef<'a>
[src]
impl<'a> Copy for HandleRef<'a>
[src]
impl<'a> Debug for HandleRef<'a>
[src]
impl<'a> Eq for HandleRef<'a>
[src]
impl<'a> PartialEq<HandleRef<'a>> for HandleRef<'a>
[src]
impl<'a> StructuralEq for HandleRef<'a>
[src]
impl<'a> StructuralPartialEq for HandleRef<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for HandleRef<'a>
impl<'a> Send for HandleRef<'a>
impl<'a> Sync for HandleRef<'a>
impl<'a> Unpin for HandleRef<'a>
impl<'a> UnwindSafe for HandleRef<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SizedIPCBuffer for T
[src]
fn size(&Self) -> usize
[src]
fn is_cool(usize, usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(usize, usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(usize, usize) -> &'a mut T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,