Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Interface

Encoder

interface Encoder

Module: System.Text
Assembly: System.Runtime.dll
Source file: Encoder.rvn

Accepts valid text and drains encoded bytes into bounded caller buffers.

Remarks

Development API. Whole-text acceptance avoids character-consumption offsets. The encoder retains accepted immutable text until drained. Single-consumer mutable state: not concurrent or reentrant. See encoder contracts.

Methods

2 items
Accept(text: string, final: bool) -> Result<void, EncodingError> Accepts one complete text chunk for conversion. Defined by Encoder.Accept · Required implementation (no default).
Drain(output: Slice<byte>) -> Result<EncoderProgress, EncodingError> Drains pending bytes into a borrowed writable destination. Defined by Encoder.Drain · Required implementation (no default).