usecrate::js::value::JsValue;/// For converting between JavaScript types.
////// Note that most class types generated by WSDOM also comes with `Into` and `AsRef` impls for converting to their ancestors in the inheritance chain.
pubtraitJsCast
where
Self: AsRef<JsValue> + Into<JsValue>,
{// fn instanceof(val: &JsValue) -> bool;
fnunchecked_from_js(val: JsValue)->Self;fnunchecked_from_js_ref(val:&JsValue)->&Self;// fn has_type<T>(&self) -> bool
// where T: JsCast { ... }
// fn dyn_into<T>(self) -> Result<T, Self>
// where T: JsCast { ... }
// fn dyn_ref<T>(&self) -> Option<&T>
// where T: JsCast { ... }
fnunchecked_into<T>(self)-> T
where
T: JsCast,
{T::unchecked_from_js(self.into())}fnunchecked_ref<T>(&self)->&T
where
T: JsCast,
{T::unchecked_from_js_ref(self.as_ref())}// fn is_instance_of<T>(&self) -> bool
// where T: JsCast { ... }
// fn is_type_of(val: &JsValue) -> bool { ... }
}