#[non_exhaustive]pub enum ValueType {
Null,
Bool,
Int,
BigInt,
Float,
String,
Array,
Map,
}Expand description
A content-less variant of the Value enum, used for reporting errors, see MerdeError::MismatchedType.
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.
Null
The JSON value is null.
Bool
The JSON value is true or false.
Int
The JSON value fits in an i64.
BigInt
The JSON value no longer fits in an i64.
Float
The JSON value has decimal places.
String
The JSON value is a string.
Array
The JSON value is an array.
Map
The JSON value is an object. Keys must be strings.
Trait Implementations§
impl Copy for ValueType
impl Eq for ValueType
impl StructuralPartialEq for ValueType
Auto Trait Implementations§
impl Freeze for ValueType
impl RefUnwindSafe for ValueType
impl Send for ValueType
impl Sync for ValueType
impl Unpin for ValueType
impl UnwindSafe for ValueType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)