Skip to main content

Module encode

Module encode 

Source
Expand description

High-level encoder API over crate::codec: zero-alloc encode_into plus an ergonomic encode that returns a stack EncodedCode.

The runtime lookup goes through crate::zigen::lookup. Build-time callers and tests should use crate::codec::encode_with_lookup directly with their own lookup closure.

Structs§

EncodedCode
Stack-allocated Wubi code (3 or 4 ASCII letters).

Functions§

encode
Convenience: encode into a stack-allocated EncodedCode.
encode_into
Zero-allocation encode. Writes the code into out and returns the number of bytes written (3 or 4).