Skip to main content

JJSON

Enum JJSON 

Source
pub enum JJSON {
    Object(HashMap<String, JJSON>),
    Array(Vec<JJSON>),
    String(String),
    Number(f64),
    Boolean(bool),
}

Variants§

§

Object(HashMap<String, JJSON>)

§

Array(Vec<JJSON>)

§

String(String)

§

Number(f64)

§

Boolean(bool)

Implementations§

Source§

impl JJSON

Source

pub fn parse(s: &str) -> Result<Self, String>

Trait Implementations§

Source§

impl Debug for JJSON

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for JJSON

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&&str> for JJSON

Source§

fn from(value: &&str) -> Self

Converts to this type from the input type.
Source§

impl From<&bool> for JJSON

Source§

fn from(value: &bool) -> Self

Converts to this type from the input type.
Source§

impl From<&f64> for JJSON

Source§

fn from(value: &f64) -> Self

Converts to this type from the input type.
Source§

impl From<&i32> for JJSON

Source§

fn from(value: &i32) -> Self

Converts to this type from the input type.
Source§

impl From<&str> for JJSON

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<&str, &str>> for JJSON

Source§

fn from(map: HashMap<&str, &str>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<&str, JJSON>> for JJSON

Source§

fn from(list: HashMap<&str, Self>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<&str, String>> for JJSON

Source§

fn from(map: HashMap<&str, String>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<&str, bool>> for JJSON

Source§

fn from(map: HashMap<&str, bool>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<&str, f64>> for JJSON

Source§

fn from(map: HashMap<&str, f64>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<&str, i32>> for JJSON

Source§

fn from(map: HashMap<&str, i32>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<String, &str>> for JJSON

Source§

fn from(map: HashMap<String, &str>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<String, String>> for JJSON

Source§

fn from(map: HashMap<String, String>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<String, bool>> for JJSON

Source§

fn from(map: HashMap<String, bool>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<String, f64>> for JJSON

Source§

fn from(map: HashMap<String, f64>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<String, i32>> for JJSON

Source§

fn from(map: HashMap<String, i32>) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for HashMap<String, String>

Source§

fn from(jjson: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for Vec<String>

Source§

fn from(jjson: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for HashMap<String, i32>

Source§

fn from(jjson: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for Vec<i32>

Source§

fn from(jjson: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for HashMap<String, f64>

Source§

fn from(jjson: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for Vec<f64>

Source§

fn from(jjson: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for HashMap<String, bool>

Source§

fn from(jjson: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for Vec<bool>

Source§

fn from(jjson: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for String

Source§

fn from(value: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for i32

Source§

fn from(value: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for f64

Source§

fn from(value: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<JJSON> for bool

Source§

fn from(value: JJSON) -> Self

Converts to this type from the input type.
Source§

impl From<String> for JJSON

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<&str>> for JJSON

Source§

fn from(list: Vec<&str>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<JJSON>> for JJSON

Source§

fn from(list: Vec<Self>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<String>> for JJSON

Source§

fn from(list: Vec<String>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<bool>> for JJSON

Source§

fn from(list: Vec<bool>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<f64>> for JJSON

Source§

fn from(list: Vec<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<i32>> for JJSON

Source§

fn from(list: Vec<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for JJSON

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for JJSON

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for JJSON

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for JJSON

Source§

fn eq(&self, other: &JJSON) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for JJSON

Auto Trait Implementations§

§

impl Freeze for JJSON

§

impl RefUnwindSafe for JJSON

§

impl Send for JJSON

§

impl Sync for JJSON

§

impl Unpin for JJSON

§

impl UnsafeUnpin for JJSON

§

impl UnwindSafe for JJSON

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.