Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
0.2.0 Preview 1 · Frozen documentation

ReadExactly

Completes a byte read through bounded sequential short operations. Stops on error, validates every reported count and preserves the already transferred prefix. Zero-length input performs no source operation. No allocation, synchronization or hidden flush is introduced.

Sn is under heavy development. Reference extracted from this release’s bundled standard library. Public API examples are not an exhaustive compatibility test. Read the matching release guide for tested workflows and limitations. 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.

ReadExactly

pub fn ReadExactly<S>(Source: mut S&, Output: mut byte[]) -> Result<void, IoError>
    where S: Reader

Completes a byte read through bounded sequential short operations. Stops on error, validates every reported count and preserves the already transferred prefix. Zero-length input performs no source operation. No allocation, synchronization or hidden flush is introduced. S: Concrete mutable Reader stream. Source: Borrowed mutable stream for this synchronous operation. Output: Borrowed mut bytes for the complete transfer. Return: Ok only at requested length; error carries proven transferred prefix. Warning: Provider operations may block; source views may not escape the call.

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