kvarn_async::prelude::compact_str::core::task

Struct RawWaker

1.36.0 · source
pub struct RawWaker { /* private fields */ }
Expand description

A RawWaker allows the implementor of a task executor to create a Waker or a LocalWaker which provides customized wakeup behavior.

It consists of a data pointer and a virtual function pointer table (vtable) that customizes the behavior of the RawWaker.

RawWakers are unsafe to use. Implementing the Wake trait is a safe alternative that requires memory allocation.

Implementations§

source§

impl RawWaker

1.36.0 (const: 1.36.0) · source

pub const fn new(data: *const (), vtable: &'static RawWakerVTable) -> RawWaker

Creates a new RawWaker from the provided data pointer and vtable.

The data pointer can be used to store arbitrary data as require