Skip to main content

rypipe_core/
value.rs

1/// A logical value produced by a decoder.
2///
3/// Decoders can emit borrowed strings when possible, or native typed values
4/// for formats like JSON that already distinguish numbers/booleans.
5#[derive(Clone, Copy, Debug, PartialEq)]
6pub enum Value<'a> {
7    /// UTF-8 string borrowed from the input buffer.
8    Str(&'a str),
9    /// 64-bit signed integer.
10    Int64(i64),
11    /// 64-bit floating point number.
12    Float64(f64),
13    /// Boolean.
14    Bool(bool),
15    /// Explicit null / missing value.
16    Null,
17}