pub trait Bindable: Component {
type Value: Into<PropertyValue> + From<PropertyValue>;
const NAME: &'static str;
// Required methods
fn read(&self) -> Self::Value;
fn write(&mut self, v: Self::Value);
}Expand description
Declares that a Component participates in the entity-property bus exposed by crate::property_store::PropertyStore.
The intent is to collapse the BindText / BindChecked / BindValue zoo onto a single, type-erased property
pipeline. The trait defines the shape; there is no registration call on crate::app::App yet, so implementing
it does not wire anything up, and no component in the workspace implements it yet. The shape it is designed
for is crate::components::TextContent (NAME = "text", Value = Arc<str>).
Required Associated Constants§
Required Associated Types§
Sourcetype Value: Into<PropertyValue> + From<PropertyValue>
type Value: Into<PropertyValue> + From<PropertyValue>
Typed value carried over the bus. Must round-trip through PropertyValue.
Required Methods§
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.