pub trait Scriptable {
// Provided methods
fn from_scriptable(_data: &ScriptableValue) -> Result<Self, ScriptableError>
where Self: Sized { ... }
fn to_scriptable(&self) -> Result<ScriptableValue, ScriptableError> { ... }
fn from_js(js: JsValue) -> Result<Self, ScriptableError>
where Self: Sized { ... }
fn to_js(&self) -> Result<JsValue, ScriptableError> { ... }
}Provided Methods§
fn from_scriptable(_data: &ScriptableValue) -> Result<Self, ScriptableError>where
Self: Sized,
fn to_scriptable(&self) -> Result<ScriptableValue, ScriptableError>
fn from_js(js: JsValue) -> Result<Self, ScriptableError>where
Self: Sized,
fn to_js(&self) -> Result<JsValue, ScriptableError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".