doc.rust-lang.org
pub const fn new(data: *const (), vtable: &'static RawWakerVTable) -> RawWaker
Creates a new RawWaker from the provided data pointer and vtable.
associated_function
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct RawWaker
A RawWaker allows the implementor of a task executor to create a Waker or a LocalWaker which provides customized wakeup behavior.
struct
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn waker(&self) -> &'a Waker
Returns a reference to the Waker for the current task.
method
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_waker(waker: &'a Waker) -> Self
Creates a new Context from a &Waker.
associated_function
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Context<'a>
The context of an asynchronous task.
struct
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro ready!
Extracts the successful type of a Poll<T>.
macro
core
Stable since 1.64.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn map_ok<U, F>(self, f: F) -> Poll<Result<U, E>>
Maps a Poll<Result<T, E>> to Poll<Result<U, E>> by applying a function to a contained Poll::Ready(Ok) value, leaving all other variants untouched.
method
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn map_err<U, F>(self, f: F) -> Poll<Result<T, U>>
Maps a Poll::Ready<Result<T, E>> to Poll::Ready<Result<T, U>> by applying a function to a contained Poll::Ready(Err) value, leaving all other variants untouched.
method
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn map<U, F>(self, f: F) -> Poll<U>
Maps a Poll<T> to Poll<U> by applying a function to a contained value.
method
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ready(&self) -> bool
Returns true if the poll is a Poll::Ready value.
method
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_pending(&self) -> bool
Returns true if the poll is a Pending value.
method
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub enum Poll<T>
Indicates whether a value is available or if the current task has been scheduled to receive a wakeup instead.
enum
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod task
Types and Traits for working with asynchronous tasks.
module
core
Stable since 1.36.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn spin_loop_hint()
Signals the processor that it is inside a busy-wait spin-loop ("spin lock").
function
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn fence(order: Ordering)
An atomic fence.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn compiler_fence(order: Ordering)
An atomic fence for synchronization within a single thread.
function
core
Stable since 1.21.0
Version 1.100.0-nightly
doc.rust-lang.org
pub enum Ordering
Atomic memory orderings
enum
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub type AtomicUsize = Atomic<usize>
An integer type which can be safely shared between threads.
type_alias
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub type AtomicU8 = Atomic<u8>
An integer type which can be safely shared between threads.
type_alias
core
Stable since 1.34.0
Version 1.100.0-nightly
doc.rust-lang.org
pub type AtomicU64 = Atomic<u64>
An integer type which can be safely shared between threads.
type_alias
core
Stable since 1.34.0
Version 1.100.0-nightly