[][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)

Implementations

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_json_str<S: AsRef<str>>(
    s: S
) -> Result<JSONGetTextValue<'static>, JSONGetTextValueError>
[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_i128(
    n: i128
) -> Result<JSONGetTextValue<'static>, JSONGetTextValueError>
[src]

pub fn from_isize(n: isize) -> 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_u128(
    n: u128
) -> Result<JSONGetTextValue<'static>, JSONGetTextValueError>
[src]

pub fn from_usize(n: usize) -> 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 from_serializable<T: Serialize>(
    v: T
) -> Result<JSONGetTextValue<'static>, Error>
[src]

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

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

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

Convert to a string for JSON format.

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

👎 Deprecated since 3.2.0:

Please use the to_json_string function instead

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).

pub fn clone_borrowed(&self) -> JSONGetTextValue[src]

Clone the reference of this JSONGetTextValue instance.

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

pub fn parse_json<S: AsRef<str>>(
    s: S
) -> Result<JSONGetTextValue<'static>, JSONGetTextValueError>
[src]

Trait Implementations

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

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

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

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

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

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

impl From<String> for JSONGetTextValue<'static>[src]

impl From<Value> for JSONGetTextValue<'static>[src]

impl From<bool> for JSONGetTextValue<'static>[src]

impl From<f32> for JSONGetTextValue<'static>[src]

impl From<f64> for JSONGetTextValue<'static>[src]

impl From<i16> for JSONGetTextValue<'static>[src]

impl From<i32> for JSONGetTextValue<'static>[src]

impl From<i64> for JSONGetTextValue<'static>[src]

impl From<i8> for JSONGetTextValue<'static>[src]

impl From<isize> for JSONGetTextValue<'static>[src]

impl From<u16> for JSONGetTextValue<'static>[src]

impl From<u32> for JSONGetTextValue<'static>[src]

impl From<u64> for JSONGetTextValue<'static>[src]

impl From<u8> for JSONGetTextValue<'static>[src]

impl From<usize> for JSONGetTextValue<'static>[src]

impl FromStr for JSONGetTextValue<'static>[src]

type Err = ()

The associated error which can be returned from parsing.

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

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

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

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

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

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

impl TryFrom<i128> for JSONGetTextValue<'static>[src]

type Error = JSONGetTextValueError

The type returned in the event of a conversion error.

impl TryFrom<u128> for JSONGetTextValue<'static>[src]

type Error = JSONGetTextValueError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'a> RefUnwindSafe for JSONGetTextValue<'a>

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

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

impl<'a> Unpin for JSONGetTextValue<'a>

impl<'a> UnwindSafe for JSONGetTextValue<'a>

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> 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.