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
This trait should not be public, use the From<(*mut q::JSContext, T)>
trait outside of this module.
Required Methods§
fn to_owned(self, context: *mut JSContext) -> OwnedJsValue
Implementations on Foreign Types§
Source§impl ToOwnedJsValue for &str
impl ToOwnedJsValue for &str
Source§impl ToOwnedJsValue for bool
impl ToOwnedJsValue for bool
Source§impl ToOwnedJsValue for f64
impl ToOwnedJsValue for f64
Source§impl ToOwnedJsValue for i8
impl ToOwnedJsValue for i8
Source§impl ToOwnedJsValue for i16
impl ToOwnedJsValue for i16
Source§impl ToOwnedJsValue for i32
impl ToOwnedJsValue for i32
Source§impl ToOwnedJsValue for i64
impl ToOwnedJsValue for i64
Source§impl ToOwnedJsValue for i128
impl ToOwnedJsValue for i128
Source§impl ToOwnedJsValue for u8
impl ToOwnedJsValue for u8
Source§impl ToOwnedJsValue for u16
impl ToOwnedJsValue for u16
Source§impl ToOwnedJsValue for u32
impl ToOwnedJsValue for u32
Source§impl ToOwnedJsValue for u64
impl ToOwnedJsValue for u64
Source§impl ToOwnedJsValue for u128
impl ToOwnedJsValue for u128
Source§impl ToOwnedJsValue for String
impl ToOwnedJsValue for String
Source§impl ToOwnedJsValue for DateTime<Utc>
impl ToOwnedJsValue for DateTime<Utc>
Source§impl ToOwnedJsValue for BigInt
impl ToOwnedJsValue for BigInt
Source§impl<K, V> ToOwnedJsValue for HashMap<K, V>
impl<K, V> ToOwnedJsValue for HashMap<K, V>
Source§impl<T> ToOwnedJsValue for Option<T>where
T: ToOwnedJsValue,
impl<T> ToOwnedJsValue for Option<T>where
T: ToOwnedJsValue,
Source§impl<T> ToOwnedJsValue for &Twhere
T: ToOwnedJsValue,
impl<T> ToOwnedJsValue for &Twhere
T: ToOwnedJsValue,
Source§impl<T> ToOwnedJsValue for Vec<T>where
T: ToOwnedJsValue,
impl<T> ToOwnedJsValue for Vec<T>where
T: ToOwnedJsValue,
Implementors§
impl ToOwnedJsValue for quickjs_rusty::value::BigInt
impl ToOwnedJsValue for JsFunction
impl ToOwnedJsValue for OwnedJsPromise
impl ToOwnedJsValue for OwnedJsValue
for some cases like HashMap<String, OwnedJsValue>