[][src]Enum json_gettext::JSONGetTextValue

pub enum JSONGetTextValue<'a> {
    Str(&'a str),
    JSONValue(Value),
    JSONValueRef(&'a Value),
}

Represents any valid JSON value. Reference can also be wrapped.

Variants

Str(&'a str)JSONValue(Value)JSONValueRef(&'a Value)

Methods

impl<'a> JSONGetTextValue<'a>[src]

pub fn from_str<S: AsRef<str> + ?Sized>(s: &'a S) -> JSONGetTextValue<'a>[src]

pub fn from_string<S: Into<String>>(s: S) -> JSONGetTextValue<'static>[src]

pub fn from_bool(b: bool) -> JSONGetTextValue<'static>[src]

pub fn from_i8(n: i8) -> JSONGetTextValue<'static>[src]

pub fn from_i16(n: i16) -> JSONGetTextValue<'static>[src]

pub fn from_i32(n: i32) -> JSONGetTextValue<'static>[src]

pub fn from_i64(n: i64) -> JSONGetTextValue<'static>[src]

pub fn from_u8(n: u8) -> JSONGetTextValue<'static>[src]

pub fn from_u16(n: u16) -> JSONGetTextValue<'static>[src]

pub fn from_u32(n: u32) -> JSONGetTextValue<'static>[src]

pub fn from_u64(n: u64) -> JSONGetTextValue<'static>[src]

pub fn from_f32(n: f32) -> JSONGetTextValue<'static>[src]

pub fn from_f64(n: f64) -> JSONGetTextValue<'static>[src]

pub fn from_json_value(v: Value) -> JSONGetTextValue<'static>[src]

pub fn from_json_value_ref(v: &'a Value) -> JSONGetTextValue<'a>[src]

pub fn null() -> JSONGetTextValue<'static>[src]

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

Convert to a string for JSON format.

pub fn as_str(&self) -> Option<&str>[src]

Convert to a string slice if it is possible (if it is a string).

Trait Implementations

impl<'a> Clone for JSONGetTextValue<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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

impl<'a> PartialEq<JSONGetTextValue<'a>> for str[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a> PartialEq<JSONGetTextValue<'a>> for &'a str[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a> Debug for JSONGetTextValue<'a>[src]

impl<'a> Display for JSONGetTextValue<'a>[src]

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

Auto Trait Implementations

impl<'a> Send for JSONGetTextValue<'a>

impl<'a> Sync for JSONGetTextValue<'a>

Blanket Implementations

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

impl<T> From<T> for 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 = 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.

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

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

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