pub enum JsonValueKind {
Null,
Boolean,
Integer,
Float,
String,
Array,
Object,
}Expand description
Enum representing the possible types of JSON values.
Variants§
Null
null.
Boolean
true or false.
Integer
Integer number.
Float
Floating-point number.
String
String.
Array
Array.
Object
Object.
Implementations§
Source§impl JsonValueKind
impl JsonValueKind
Sourcepub const fn is_null(self) -> bool
pub const fn is_null(self) -> bool
Returns true if this kind is JsonValueKind::Null.
Sourcepub const fn is_bool(self) -> bool
pub const fn is_bool(self) -> bool
Returns true if this kind is JsonValueKind::Boolean.
Sourcepub const fn is_integer(self) -> bool
pub const fn is_integer(self) -> bool
Returns true if this kind is JsonValueKind::Integer.
Sourcepub const fn is_float(self) -> bool
pub const fn is_float(self) -> bool
Returns true if this kind is JsonValueKind::Float.
Sourcepub const fn is_number(self) -> bool
pub const fn is_number(self) -> bool
Returns true if this kind is either JsonValueKind::Integer or JsonValueKind::Float.
Sourcepub const fn is_string(self) -> bool
pub const fn is_string(self) -> bool
Returns true if this kind is JsonValueKind::String.
Sourcepub const fn is_array(self) -> bool
pub const fn is_array(self) -> bool
Returns true if this kind is JsonValueKind::Array.
Sourcepub const fn is_object(self) -> bool
pub const fn is_object(self) -> bool
Returns true if this kind is JsonValueKind::Object.
Trait Implementations§
Source§impl Clone for JsonValueKind
impl Clone for JsonValueKind
Source§fn clone(&self) -> JsonValueKind
fn clone(&self) -> JsonValueKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonValueKind
impl Debug for JsonValueKind
Source§impl Hash for JsonValueKind
impl Hash for JsonValueKind
Source§impl Ord for JsonValueKind
impl Ord for JsonValueKind
Source§fn cmp(&self, other: &JsonValueKind) -> Ordering
fn cmp(&self, other: &JsonValueKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for JsonValueKind
impl PartialEq for JsonValueKind
Source§impl PartialOrd for JsonValueKind
impl PartialOrd for JsonValueKind
impl Copy for JsonValueKind
impl Eq for JsonValueKind
impl StructuralPartialEq for JsonValueKind
Auto Trait Implementations§
impl Freeze for JsonValueKind
impl RefUnwindSafe for JsonValueKind
impl Send for JsonValueKind
impl Sync for JsonValueKind
impl Unpin for JsonValueKind
impl UnwindSafe for JsonValueKind
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