Trait BindDescriptor
pub trait BindDescriptor {
type Event: EventDescriptor;
type ValueTy: Into<JsValue> + Clone;
const TARGET_PROPERTY: &'static str;
const CONVERT_FROM_JS: for<'a> fn(_: &'a JsValue) -> Option<Self::ValueTy>;
}
Expand description
Description for a bind-able attribute/property.
Required Associated Constants§
const TARGET_PROPERTY: &'static str
const TARGET_PROPERTY: &'static str
The name of the property to which we are binding.
const CONVERT_FROM_JS: for<'a> fn(_: &'a JsValue) -> Option<Self::ValueTy>
const CONVERT_FROM_JS: for<'a> fn(_: &'a JsValue) -> Option<Self::ValueTy>
Function for converting from JS to Rust type.
Required Associated Types§
type Event: EventDescriptor
type Event: EventDescriptor
The event which we listen to to update the value.
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.