Enum quick_js::JsValue [−][src]
A value that can be (de)serialized to/from the quickjs runtime.
Variants
Bool(bool)
Int(i32)
Float(f64)
String(String)
chrono::Datetimechrono
feature.
BigInt(BigInt)
num_bigint::BigInt / JS BigInt integration
Only available with the optional bigint
feature
Implementations
impl JsValue
[src]
pub fn as_str(&self) -> Option<&str>
[src]
Cast value to a str.
Returns Some(&str)
if value is a JsValue::String
, None otherwise.
pub fn into_string(self) -> Option<String>
[src]
Convert to String
.
Trait Implementations
impl Clone for JsValue
[src]
impl Debug for JsValue
[src]
impl<'a> From<&'a str> for JsValue
[src]
impl From<BigInt> for JsValue
[src]
impl<K, V> From<HashMap<K, V, RandomState>> for JsValue where
K: Into<String>,
V: Into<JsValue>,
[src]
K: Into<String>,
V: Into<JsValue>,
impl<T> From<Option<T>> for JsValue where
T: Into<JsValue>,
[src]
T: Into<JsValue>,
impl From<String> for JsValue
[src]
impl<T> From<Vec<T, Global>> for JsValue where
T: Into<JsValue>,
[src]
T: Into<JsValue>,
impl From<bool> for JsValue
[src]
impl From<f64> for JsValue
[src]
impl From<i128> for JsValue
[src]
impl From<i16> for JsValue
[src]
impl From<i32> for JsValue
[src]
impl From<i64> for JsValue
[src]
impl From<i8> for JsValue
[src]
impl From<u128> for JsValue
[src]
impl From<u16> for JsValue
[src]
impl From<u32> for JsValue
[src]
impl From<u64> for JsValue
[src]
impl From<u8> for JsValue
[src]
impl PartialEq<JsValue> for JsValue
[src]
impl StructuralPartialEq for JsValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for JsValue
impl Send for JsValue
impl Sync for JsValue
impl Unpin for JsValue
impl UnwindSafe for JsValue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,