Trait ToOwnedJsValue

Source
pub trait ToOwnedJsValue {
    // Required method
    fn to_owned(self, context: *mut JSContext) -> OwnedJsValue;
}
Expand description

to avoid infinite recursion, we need to implement a ToOwnedJsValue trait for T, and then implement the From<(*mut q::JSContext, T)> trait for T and XXX where T: ToOwnedJsValue

This trait should not be public, use the From<(*mut q::JSContext, T)> trait outside of this module.

Required Methods§

Implementations on Foreign Types§

Source§

impl ToOwnedJsValue for &str

Source§

impl ToOwnedJsValue for bool

Source§

impl ToOwnedJsValue for f64

Source§

impl ToOwnedJsValue for i8

Source§

impl ToOwnedJsValue for i16

Source§

impl ToOwnedJsValue for i32

Source§

impl ToOwnedJsValue for i64

Source§

impl ToOwnedJsValue for i128

Source§

impl ToOwnedJsValue for u8

Source§

impl ToOwnedJsValue for u16

Source§

impl ToOwnedJsValue for u32

Source§

impl ToOwnedJsValue for u64

Source§

impl ToOwnedJsValue for u128

Source§

impl ToOwnedJsValue for String

Source§

impl ToOwnedJsValue for DateTime<Utc>

Source§

impl ToOwnedJsValue for BigInt

Source§

impl<K, V> ToOwnedJsValue for HashMap<K, V>
where K: Into<String>, V: ToOwnedJsValue,

Source§

impl<T> ToOwnedJsValue for Option<T>
where T: ToOwnedJsValue,

Source§

impl<T> ToOwnedJsValue for &T
where T: ToOwnedJsValue,

Source§

impl<T> ToOwnedJsValue for Vec<T>
where T: ToOwnedJsValue,

Implementors§

Source§

impl ToOwnedJsValue for quickjs_rusty::value::BigInt

Source§

impl ToOwnedJsValue for JsFunction

Source§

impl ToOwnedJsValue for OwnedJsPromise

Source§

impl ToOwnedJsValue for OwnedJsValue

for some cases like HashMap<String, OwnedJsValue>