pub struct CompletionWaker<'d> { /* private fields */ }Expand description
A driver-scoped, type-erased wake target for an in-flight operation.
Unlike ReadyKey, this preserves hierarchical task wakeups. A completion
can therefore wake the exact child task that registered the operation,
rather than only waking the root runtime task.
Implementations§
Source§impl<'d> CompletionWaker<'d>
impl<'d> CompletionWaker<'d>
pub fn from_ready(driver: DriverRef<'d>, key: ReadyKey<'d>) -> Self
Sourcepub unsafe fn from_callback(
target: NonNull<()>,
callback: unsafe fn(NonNull<()>),
) -> Self
pub unsafe fn from_callback( target: NonNull<()>, callback: unsafe fn(NonNull<()>), ) -> Self
§Safety
target must remain valid for every call to wake while this handle is
live, and callback must accept that exact target.
pub fn wake(self)
Trait Implementations§
Source§impl<'d> Clone for CompletionWaker<'d>
impl<'d> Clone for CompletionWaker<'d>
Source§fn clone(&self) -> CompletionWaker<'d>
fn clone(&self) -> CompletionWaker<'d>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'d> Copy for CompletionWaker<'d>
Auto Trait Implementations§
impl<'d> !RefUnwindSafe for CompletionWaker<'d>
impl<'d> !Send for CompletionWaker<'d>
impl<'d> !Sync for CompletionWaker<'d>
impl<'d> !UnwindSafe for CompletionWaker<'d>
impl<'d> Freeze for CompletionWaker<'d>
impl<'d> Unpin for CompletionWaker<'d>
impl<'d> UnsafeUnpin for CompletionWaker<'d>
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