#[non_exhaustive]pub enum Input {
Json(Vec<u8>),
Yaml(Vec<u8>),
Value(Value),
}Expand description
The bytes or value a description arrives as.
The variant records where the numbers came from, because exactness
cannot be reconstructed after the fact: only Input::Json, which
this crate parses itself, can yield Fidelity::Exact. The YAML
reader may round through f64, and a ready-made Value has unknown
provenance whatever its caller believes about it. There is
deliberately no way to assert exactness on a Value.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Json(Vec<u8>)
JSON text. The only way to obtain exact numbers.
Yaml(Vec<u8>)
YAML text, read with serde-saphyr. An integer within the 64-bit
range is kept exactly; a fraction, an exponent, or an untagged
decimal integer past u64::MAX or below i64::MIN is read through
f64.
Value(Value)
An already-parsed value of unknown provenance.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Input
impl Freeze for Input
impl Move for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnsafeUnpin for Input
impl UnwindSafe for Input
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more