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

WriteTextAsync

Submits all UTF-8 bytes without implicit downstream flushing. Text is already valid UTF-8; byte transfer preserves exact encoding and reports byte-prefix counts. No intermediate byte storage or locale conversion is added.

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.

WriteTextAsync

pub async fn WriteTextAsync<S>(Source: mut S&, Text: str, mut Token: CancellationToken) -> Task<Result<void, IoError>> where S: AsyncWriter

Submits all UTF-8 bytes without implicit downstream flushing. Text is already valid UTF-8; byte transfer preserves exact encoding and reports byte-prefix counts. No intermediate byte storage or locale conversion is added. S: Structural AsyncWriter source type. Source: Borrowed mutable stream, retained through completion. Text: Borrowed valid UTF-8 backing retained through completion. Token: Cancellation observation passed into full byte transfer. Return: Task yielding complete submission or portable failure with transferred-byte prefix. Warning: May suspend in the provider; success does not promise flush/durability.

WriteTextAsync

pub fn WriteTextAsync<S>(Source: mut S&, Text: str) -> Task<Result<void, IoError>> where S: AsyncWriter

Supplies the omitted arguments to WriteTextAsync. 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. Text: 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