Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Development · Evolving reference

WriteAllAsync

Completes an incremental byte transfer by awaiting one short operation at a time. Preserves exact partial error identity/counts, validates reported lengths and adds no intermediate byte buffer or implicit flush. Zero length makes no source operation. Source and byte backing loans remain live until task completion.

Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →

Module std.io

import std.io;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

WriteAllAsync

pub async fn WriteAllAsync<S>(Source: mut S&, Input: readonly byte[], Token: CancellationToken) -> Task<Result<void, IoError>>
    where S: AsyncWriter

Completes an incremental byte transfer by awaiting one short operation at a time. Preserves exact partial error identity/counts, validates reported lengths and adds no intermediate byte buffer or implicit flush. Zero length makes no source operation. Source and byte backing loans remain live until task completion. S: Concrete mutable AsyncWriter stream. Source: Borrowed mutable stream retained by ordinary origin rules. Input: Borrowed readonly bytes retained through completion. Token: Owned cancellation observation copied into each awaited step. Return: Task yielding complete success or exact proven transferred-prefix error. Warning: Do not mutate/move borrowed backing or source while work is pending.

WriteAllAsync

pub fn WriteAllAsync<S>(Source: mut S&, Input: readonly byte[]) -> Task<Result<void, IoError>>
    where S: AsyncWriter

Supplies the omitted arguments to WriteAllAsync. Note: Defaults: Token = CancellationToken(). S: Same generic argument and constraints as the full operation. Source: Same input, ownership and lifetime contract as the full operation. Input: Same input, ownership and lifetime contract as the full operation. Return: Exact full-operation result; no additional async frame is created.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library