Immutable bytes without an implied text encoding.
Signature
Cloning shares a packed Arc allocation. bytes constructs Bin from List[u8], Str.utf8 encodes text, and Bin.decode validates UTF-8 with a Res result. Indexing returns Res[u8, DataError]; slicing produces Res[Bin, DataError]. Concatenation creates independent data and respects byte limits.
Methods
Examples
Keep bytes distinct from text
Encoding is explicit; byte length and Unicode scalar count differ.
main.kj
Loading…Drag to orbit · select to inspect
0 entities
Scene controls
Results
Loading the language runtime…
Output 0
No output.
State
Compile source to inspect its values.
TraceNo execution yet
- Executed source spans appear here.
Expected output
4 5 café
Rust definition
Value::Bin(konjure_sdk::data::Bin); shared immutable byte storage.
View Rust documentation →Support: runtime