pub trait ReadoutBinder: Send {
// Required method
fn fire(
&mut self,
event: EventType,
ctx: &dyn ReadoutContext,
sink: &mut dyn ReadoutSink,
);
// Provided method
fn on_key(&mut self, _key: BinderKey) { ... }
}Expand description
Stateful runtime adapter — drives readouts in response to events, applies any interactive state (Push 5), emits ordered render instructions to the sink.
The trait is &mut self so stateful impls can mutate
focus / LOD overrides / overlay-held in-place. That’s
also why the bound is Send (move-across-threads) but
not Sync (shared-mutable-access): every fire mutates
state, so concurrent fires would race. Surfaces that
genuinely need cross-thread fire access wrap the binder
in a Mutex / channel, not a shared reference.
Required Methods§
Sourcefn fire(
&mut self,
event: EventType,
ctx: &dyn ReadoutContext,
sink: &mut dyn ReadoutSink,
)
fn fire( &mut self, event: EventType, ctx: &dyn ReadoutContext, sink: &mut dyn ReadoutSink, )
Drive every readout bound to event. The binder
applies its interactive state, walks the resolved
list, and emits render steps to sink.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".