[][src]Enum quick::JsValue

pub enum JsValue {
    Null,
    Bool(bool),
    Int(i32),
    Float(f64),
    String(String),
    Array(Vec<JsValue>),
    Object(HashMap<String, JsValue>),
}

A value that can be (de)serialized to/from the quickjs runtime.

Variants

NullBool(bool)Int(i32)Float(f64)String(String)Array(Vec<JsValue>)Object(HashMap<String, JsValue>)

Methods

impl JsValue[src]

pub fn into_string(self) -> Option<String>[src]

Trait Implementations

impl From<bool> for JsValue[src]

impl From<i32> for JsValue[src]

impl From<f64> for JsValue[src]

impl From<String> for JsValue[src]

impl From<i8> for JsValue[src]

impl From<i16> for JsValue[src]

impl From<u8> for JsValue[src]

impl From<u16> for JsValue[src]

impl From<u32> for JsValue[src]

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

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

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

impl<K, V> From<HashMap<K, V, RandomState>> for JsValue where
    K: Into<String>,
    V: Into<JsValue>, 
[src]

impl PartialEq<JsValue> for JsValue[src]

impl Clone for JsValue[src]

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

Performs copy-assignment from source. Read more

impl Debug for JsValue[src]

impl TryFrom<JsValue> for bool[src]

type Error = ValueError

The type returned in the event of a conversion error.

impl TryFrom<JsValue> for i32[src]

type Error = ValueError

The type returned in the event of a conversion error.

impl TryFrom<JsValue> for f64[src]

type Error = ValueError

The type returned in the event of a conversion error.

impl TryFrom<JsValue> for String[src]

type Error = ValueError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl Unpin for JsValue

impl Sync for JsValue

impl Send for JsValue

impl RefUnwindSafe for JsValue

impl UnwindSafe for JsValue

Blanket Implementations

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, U> Into<U> for T where
    U: From<T>, 
[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> 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]