Struct AnyState

Source
pub struct AnyState<M: Manager> {
    pub data_type: DataType,
    pub status: ParsingStatus,
    pub current: JsonElement<M::Dealloc>,
    pub stack: Vec<JsonStackElement<M::Dealloc>>,
    pub consts: BTreeMap<String, Any<M::Dealloc>>,
}

Fields§

§data_type: DataType§status: ParsingStatus§current: JsonElement<M::Dealloc>§stack: Vec<JsonStackElement<M::Dealloc>>§consts: BTreeMap<String, Any<M::Dealloc>>

Implementations§

Source§

impl<M: Manager> AnyState<M>

Source

pub fn set_djs(self) -> Self

Source

pub fn set_mjs(self) -> Self

Source

pub fn set_cjs(self) -> Self

Source

pub fn parse( self, manager: M, token: JsonToken<M::Dealloc>, ) -> (AnyResult<M>, Option<String>)

Source

pub fn parse_for_module( self, manager: M, token: JsonToken<M::Dealloc>, ) -> (JsonState<M>, Option<String>)

Source

pub fn parse_import_begin(self, token: JsonToken<M::Dealloc>) -> AnyResult<M>

Source

pub fn parse_import_end(self, token: JsonToken<M::Dealloc>) -> AnyResult<M>

Source

pub fn begin_import(self) -> AnyResult<M>

Source

pub fn end_import(self) -> AnyResult<M>

Source

pub fn parse_value( self, manager: M, token: JsonToken<M::Dealloc>, ) -> AnyResult<M>

Source

pub fn push_value(self, value: Any<M::Dealloc>) -> AnyResult<M>

Source

pub fn push_key(self, s: String) -> AnyResult<M>

Source

pub fn parse_array_comma( self, manager: M, token: JsonToken<M::Dealloc>, ) -> AnyResult<M>

Source

pub fn parse_array_begin( self, manager: M, token: JsonToken<M::Dealloc>, ) -> AnyResult<M>

Source

pub fn parse_array_value( self, manager: M, token: JsonToken<M::Dealloc>, ) -> AnyResult<M>

Source

pub fn begin_array(self) -> AnyResult<M>

Source

pub fn end_array(self, manager: M) -> AnyResult<M>

Source

pub fn parse_object_begin( self, manager: M, token: JsonToken<M::Dealloc>, ) -> AnyResult<M>

Source

pub fn parse_object_next( self, manager: M, token: JsonToken<M::Dealloc>, ) -> AnyResult<M>

Source

pub fn parse_object_comma( self, manager: M, token: JsonToken<M::Dealloc>, ) -> AnyResult<M>

Source

pub fn parse_object_key(self, token: JsonToken<M::Dealloc>) -> AnyResult<M>

Source

pub fn begin_object(self) -> AnyResult<M>

Source

pub fn end_object(self, manager: M) -> AnyResult<M>

Trait Implementations§

Source§

impl<M: Manager> Default for AnyState<M>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<M> Freeze for AnyState<M>

§

impl<M> RefUnwindSafe for AnyState<M>
where <M as Manager>::Dealloc: RefUnwindSafe,

§

impl<M> Send for AnyState<M>
where <M as Manager>::Dealloc: Send,

§

impl<M> Sync for AnyState<M>
where <M as Manager>::Dealloc: Sync,

§

impl<M> Unpin for AnyState<M>
where <M as Manager>::Dealloc: Unpin,

§

impl<M> UnwindSafe for AnyState<M>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> RefMut for T

Source§

unsafe fn to_mut_ptr(&mut self) -> *mut Self

Source§

fn modify(&mut self, f: impl FnOnce(Self) -> Self)
where Self: Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.