pub trait ComponentState: Any {
// Required methods
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
// Provided methods
fn handle_action(&mut self, _action: &UiAction) -> ComponentActionOutcome { ... }
fn advance(&mut self, _elapsed_ms: f32) -> bool { ... }
fn wants_frame(&self) -> bool { ... }
fn frame_interval_ms(&self) -> u64 { ... }
fn take_route_invalidation(&mut self) -> bool { ... }
}Required Methods§
Provided Methods§
fn handle_action(&mut self, _action: &UiAction) -> ComponentActionOutcome
fn advance(&mut self, _elapsed_ms: f32) -> bool
fn wants_frame(&self) -> bool
fn frame_interval_ms(&self) -> u64
fn take_route_invalidation(&mut self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".