type DecodeError
Why bytes could not be decoded into a value ([С §9.4]; declared in the prelude).
Example:
use std.ser { decode }
fn main() io {
let junk = b"\xff\xff\xff"
match decode<i64>(&junk) {
i64 _ => print("decoded")
DecodeError _ => print("malformed")
}
}Вывод
malformed
pub(api) type DecodeError = std.core.DecodeErrorС версии. 1.0.0-beta
Определено в: std/ser/ser.oxl:68