OxL Reference

enum Format

Wire formats of encode / decode (D-2104). std.ser.formats has the lower-case names of the standard.

Example:

oxl✓ checked in CI
use std.ser { encode, Format, hex }

fn main() io {
  let a = encode(&300, Format.Oxl)!
  let b = encode(&300, Format.Json)!
  print("{hex(&a)} {Utf8.decode(b)!}")
}
Output
08ac02 "300"
pub(api) enum Format

Since. 1.0.0-beta

Variants

Oxl

The OxL binary format (protobuf 3 wire encoding).

Json

Canonical protobuf JSON.

Msgpack

MessagePack.

Cbor

CBOR (RFC 8949).

Defined in: std/ser/ser.oxl:85

See also