[][src]Enum miniserde::json::Value

pub enum Value {
    Null,
    Bool(bool),
    Number(Number),
    String(String),
    Array(Array),
    Object(Object),
}

Any valid JSON value.

This type has a non-recursive drop implementation so it is safe to build arbitrarily deeply nested instances.

use miniserde::json::{Array, Value};

let mut value = Value::Null;
for _ in 0..100000 {
    let mut array = Array::new();
    array.push(value);
    value = Value::Array(array);
}
// no stack overflow when `value` goes out of scope

Variants

Null
Bool(bool)
Number(Number)
String(String)
Array(Array)
Object(Object)

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl Default for Value[src]

fn default() -> Self[src]

The default value is null.

impl Deserialize for Value[src]

impl FromIterator<Value> for Array[src]

impl Serialize for Value[src]

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.