Method
Accept
abstract virtual func Accept(text: string, final: bool) -> Result<void, EncodingError>
Declaring type: Encoder
Module: System.Text
Assembly: System.Runtime.dll
Source file: Encoder.rvn
Defined by Encoder.Accept · Required implementation (no default).
Interface implementation: Required implementation (no default).
Accepts one complete text chunk for conversion.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String | Valid Unicode text, at most 65536 UTF-8 bytes for built-in providers. |
final |
Boolean | True ends input; final bytes still need draining. |
Return value
Result<void, EncodingError>
Unit on acceptance, Busy for undrained nonfinal input, Finished after final input, LimitExceeded, or UnrepresentableText.
Remarks
Success retains the immutable text value. Strict ASCII preflights the complete input before state changes or output. Preflight errors are retryable. Empty input is valid. Once final input is accepted, no further input is allowed. A caller must Drain even after accepting empty final input.