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

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. 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.

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