pub enum Value<'s> {
String(&'s str),
Number(Number<'s>),
Bool(bool),
Null,
Array,
Object,
}Expand description
The next value, as Cursor::value reads it.
Variants§
String(&'s str)
A string, borrowed from the input or decoded into the caller’s buffer.
Number(Number<'s>)
A number: its exact text, and its value as an i64 or an f64.
Bool(bool)
true or false.
Null
null.
Array
An array starts here: read it with Cursor::first_item.
Object
An object starts here: read it with Cursor::first_key.
Trait Implementations§
impl<'s> Copy for Value<'s>
impl<'s> Eq for Value<'s>
impl<'s> StructuralPartialEq for Value<'s>
Auto Trait Implementations§
impl<'s> Forget for Value<'s>
impl<'s> Freeze for Value<'s>
impl<'s> RefUnwindSafe for Value<'s>
impl<'s> Send for Value<'s>
impl<'s> Sync for Value<'s>
impl<'s> Unpin for Value<'s>
impl<'s> UnsafeUnpin for Value<'s>
impl<'s> UnwindSafe for Value<'s>
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