pub enum JsonParseState {
Show 14 variants
Start,
InObject,
InObjectKey,
AfterKey,
InObjectValue,
InArray,
InArrayValue,
InString,
InStringEscape,
InNumber,
InBool,
InNull,
Complete,
Error,
}Expand description
Internal parser state for JsonConstraint.
Variants§
Start
Before any character has been emitted.
InObject
Inside a JSON object {, waiting for a key or }.
InObjectKey
Inside a string that is an object key.
AfterKey
After an object key, expecting :.
InObjectValue
After :, waiting for a value.
InArray
Inside a JSON array [, waiting for a value or ].
InArrayValue
After a value inside an array, waiting for , or ].
InString
Inside a string value (or key).
InStringEscape
Immediately after a \ inside a string.
InNumber
Inside a number literal.
InBool
Inside a boolean keyword (true / false).
InNull
Inside null.
Complete
Top-level value is complete.
Error
An error has been encountered.
Trait Implementations§
Source§impl Clone for JsonParseState
impl Clone for JsonParseState
Source§fn clone(&self) -> JsonParseState
fn clone(&self) -> JsonParseState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 JsonParseState
impl Debug for JsonParseState
Source§impl PartialEq for JsonParseState
impl PartialEq for JsonParseState
Source§fn eq(&self, other: &JsonParseState) -> bool
fn eq(&self, other: &JsonParseState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JsonParseState
Auto Trait Implementations§
impl Freeze for JsonParseState
impl RefUnwindSafe for JsonParseState
impl Send for JsonParseState
impl Sync for JsonParseState
impl Unpin for JsonParseState
impl UnsafeUnpin for JsonParseState
impl UnwindSafe for JsonParseState
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more