[][src]Enum simd_json::value::borrowed::Value

pub enum Value<'v> {
    Static(StaticNode),
    String(Cow<'v, str>),
    Array(Vec<Value<'v>>),
    Object(Box<Object<'v>>),
}

Borrowed JSON-DOM Value, consider using the ValueTrait to access its content

Variants

Static(StaticNode)

Static values

String(Cow<'v, str>)

string type

Array(Vec<Value<'v>>)

array type

Object(Box<Object<'v>>)

object type

Methods

impl<'value> Value<'value>[src]

pub fn encode(&self) -> String[src]

Encodes the value into it's JSON representation as a string

pub fn encode_pp(&self) -> String[src]

Encodes the value into it's JSON representation as a string (pretty printed)

pub fn write<'writer, W>(&self, w: &mut W) -> Result<()> where
    W: 'writer + Write
[src]

Encodes the value into it's JSON representation into a Writer

pub fn write_pp<'writer, W>(&self, w: &mut W) -> Result<()> where
    W: 'writer + Write
[src]

Encodes the value into it's JSON representation into a Writer, pretty printed

impl<'v> Value<'v>[src]

pub fn into_static(self) -> Value<'static>[src]

Enforces static lifetime on a borrowed value, this will force all strings to become owned COW's, the same applies for Object keys.

pub fn clone_static(&self) -> Value<'static>[src]

Clones the current value and enforces a static lifetime, it works the same as into_static but includes cloning logic

Trait Implementations

impl<'v> ValueBuilder for Value<'v>[src]

impl<'v> MutableValue for Value<'v>[src]

type Key = Cow<'v, str>

The type for Objects

impl<'v> Value for Value<'v>[src]

type Key = Cow<'v, str>

The type for Objects

impl<'a> From<Value> for Value<'a>[src]

impl<'v> From<StaticNode> for Value<'v>[src]

impl<'v> From<&'v str> for Value<'v>[src]

impl<'v> From<Cow<'v, str>> for Value<'v>[src]

impl<'v> From<String> for Value<'v>[src]

impl<'v> From<bool> for Value<'v>[src]

impl<'v> From<()> for Value<'v>[src]

impl<'v> From<i8> for Value<'v>[src]

impl<'v> From<i16> for Value<'v>[src]

impl<'v> From<i32> for Value<'v>[src]

impl<'v> From<i64> for Value<'v>[src]

impl<'v> From<u8> for Value<'v>[src]

impl<'v> From<u16> for Value<'v>[src]

impl<'v> From<u32> for Value<'v>[src]

impl<'v> From<u64> for Value<'v>[src]

impl<'v> From<usize> for Value<'v>[src]

impl<'v> From<f32> for Value<'v>[src]

impl<'v> From<f64> for Value<'v>[src]

impl<'v, S> From<Vec<S>> for Value<'v> where
    Value<'v>: From<S>, 
[src]

impl<'v> From<HashMap<Cow<'v, str>, Value<'v>, ABuildHasher>> for Value<'v>[src]

impl<'_> From<Value<'_>> for Value[src]

impl<'v> Clone for Value<'v>[src]

impl<'v> Default for Value<'v>[src]

impl<'a> PartialEq<Value<'a>> for Value<'a>[src]

impl<'v, '_, T> PartialEq<&'_ T> for Value<'v> where
    Value<'v>: PartialEq<T>, 
[src]

impl<'a> PartialEq<Value> for Value<'a>[src]

impl<'v> PartialEq<()> for Value<'v>[src]

impl<'v> PartialEq<bool> for Value<'v>[src]

impl<'v> PartialEq<str> for Value<'v>[src]

impl<'v, '_> PartialEq<&'_ str> for Value<'v>[src]

impl<'v> PartialEq<String> for Value<'v>[src]

impl<'v> PartialEq<i8> for Value<'v>[src]

impl<'v> PartialEq<i16> for Value<'v>[src]

impl<'v> PartialEq<i32> for Value<'v>[src]

impl<'v> PartialEq<i64> for Value<'v>[src]

impl<'v> PartialEq<i128> for Value<'v>[src]

impl<'v> PartialEq<u8> for Value<'v>[src]

impl<'v> PartialEq<u16> for Value<'v>[src]

impl<'v> PartialEq<u32> for Value<'v>[src]

impl<'v> PartialEq<u64> for Value<'v>[src]

impl<'v> PartialEq<usize> for Value<'v>[src]

impl<'v> PartialEq<u128> for Value<'v>[src]

impl<'v> PartialEq<f32> for Value<'v>[src]

impl<'v> PartialEq<f64> for Value<'v>[src]

impl<'_> PartialEq<Value<'_>> for Value[src]

impl<'v> Debug for Value<'v>[src]

impl<'v> Display for Value<'v>[src]

impl<'value> TryFrom<Value> for BorrowedValue<'value>[src]

type Error = SerdeConversionError

The type returned in the event of a conversion error.

impl<'v, '_> Index<&'_ str> for Value<'v>[src]

type Output = Value<'v>

The returned type after indexing.

impl<'v> Index<usize> for Value<'v>[src]

type Output = Value<'v>

The returned type after indexing.

impl<'v, '_> IndexMut<&'_ str> for Value<'v>[src]

impl<'v> IndexMut<usize> for Value<'v>[src]

impl<'v, V: Into<Value<'v>>> FromIterator<V> for Value<'v>[src]

impl<'v, K: Into<Cow<'v, str>>, V: Into<Value<'v>>> FromIterator<(K, V)> for Value<'v>[src]

impl<'value> TryInto<Value> for BorrowedValue<'value>[src]

type Error = SerdeConversionError

The type returned in the event of a conversion error.

impl<'de> Deserializer<'de> for Value<'de>[src]

type Error = Error

The error type that can be returned if some error occurs during deserialization. Read more

impl<'a> Serialize for Value<'a>[src]

impl<'de> Deserialize<'de> for Value<'de>[src]

Auto Trait Implementations

impl<'v> Send for Value<'v>

impl<'v> Sync for Value<'v>

impl<'v> Unpin for Value<'v>

impl<'v> UnwindSafe for Value<'v>

impl<'v> RefUnwindSafe for Value<'v>

Blanket Implementations

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

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

type Error = !

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.

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

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

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