pub trait Tsify {
type JsType: JsCast;
const DECL: &'static str;
// Provided methods
fn into_js(&self) -> Result<Self::JsType, Error>
where Self: Serialize { ... }
fn from_js<T>(js: T) -> Result<Self, Error>
where T: Into<JsValue>,
Self: DeserializeOwned { ... }
}Required Associated Constants§
Required Associated Types§
Provided Methods§
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.