SharedTask
Retains repeated readonly observation of one asynchronous completion.
Module std.task
import std.task;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
SharedTask
pub final class SharedTask<T>Retains repeated readonly observation of one asynchronous completion. T: Owned completion kept alive by shared visible/native owners; void has no value. @details Copying retains the same frame without copying T or allocating. Await yields readonly T&; its borrow retains no owner and must end before the last protecting shared handle is moved, destroyed or replaced.
SharedTask.init
pub init()Initializes an empty shared handle without allocation.
SharedTask.init
pub init(Source: readonly Self&)Retains Source's frame without copying its result. Source: Existing shared owner, or empty handle.
SharedTask.init
pub init(Source: mut Self&&)Moves the shared owner without retaining it again. Source: Explicitly moved owner left empty.
SharedTask.operator
pub fn operator =(Source: readonly Self&) -> voidRetains Source before releasing the replaced owner. Source: Existing shared owner; exact self-assignment is harmless. Return: No value.
SharedTask.operator
pub fn operator =(Source: mut Self&&) -> voidMoves Source after releasing the replaced owner, with harmless self-assignment. Source: Explicitly moved shared owner left empty. Return: No value.
SharedTask.IsCompleted
pub IsCompleted: bool;Observes terminal publication without creating a result borrow. Return: False for empty/pending, true after completion.