OxL Reference

type DecodeError

Why bytes could not be decoded into a value ([С §9.4]; declared in the prelude).

Example:

oxl✓ checked in CI
use std.ser { decode }

fn main() io {
  let junk = b"\xff\xff\xff"
  match decode<i64>(&junk) {
    i64 _ => print("decoded")
    DecodeError _ => print("malformed")
  }
}
Output
malformed
pub(api) type DecodeError = std.core.DecodeError

Since. 1.0.0-beta

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

See also