Struct nanoserde::DeJsonState
source · [−]pub struct DeJsonState {
pub cur: char,
pub tok: DeJsonTok,
pub strbuf: String,
pub numbuf: String,
pub identbuf: String,
pub line: usize,
pub col: usize,
}
Expand description
The internal state of a JSON deserialization.
Fields
cur: char
tok: DeJsonTok
strbuf: String
numbuf: String
identbuf: String
line: usize
col: usize
Implementations
sourceimpl DeJsonState
impl DeJsonState
pub fn next(&mut self, i: &mut Chars<'_>)
pub fn err_exp(&self, name: &str) -> DeJsonErr
pub fn err_nf(&self, name: &str) -> DeJsonErr
pub fn err_enum(&self, name: &str) -> DeJsonErr
pub fn err_token(&self, what: &str) -> DeJsonErr
pub fn err_range(&self, what: &str) -> DeJsonErr
pub fn err_type(&self, what: &str) -> DeJsonErr
pub fn err_parse(&self, what: &str) -> DeJsonErr
pub fn eat_comma_block(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
pub fn whole_field(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
pub fn eat_comma_curly(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
pub fn colon(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
pub fn string(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
pub fn next_colon(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
pub fn next_str(&mut self) -> Option<()>
pub fn block_open(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
pub fn block_close(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
pub fn curly_open(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
pub fn curly_close(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
pub fn u64_range(&mut self, max: u64) -> Result<u64, DeJsonErr>
pub fn i64_range(&mut self, min: i64, max: i64) -> Result<i64, DeJsonErr>
pub fn as_f64(&mut self) -> Result<f64, DeJsonErr>
pub fn as_bool(&mut self) -> Result<bool, DeJsonErr>
pub fn as_string(&mut self) -> Result<String, DeJsonErr>
pub fn next_tok(&mut self, i: &mut Chars<'_>) -> Result<(), DeJsonErr>
Trait Implementations
sourceimpl Default for DeJsonState
impl Default for DeJsonState
sourcefn default() -> DeJsonState
fn default() -> DeJsonState
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for DeJsonState
impl Send for DeJsonState
impl Sync for DeJsonState
impl Unpin for DeJsonState
impl UnwindSafe for DeJsonState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more