pub trait Component: Send + 'static {
// Required methods
fn new(ctx: &Context<'_>) -> Self;
fn view(&self, ctx: &Context<'_>) -> Node;
// Provided methods
fn events(&self) -> RVec<EventFilter> { ... }
fn foreground_services(&self) -> RVec<RString> { ... }
fn watch(&mut self, _ctx: &Context<'_>) { ... }
fn update(&mut self, _ctx: &Context<'_>, _event: &Event) -> ItemEffect { ... }
fn check_view(&self, _ctx: &Context<'_>) -> bool { ... }
fn hoverable() -> bool { ... }
fn stop(&mut self, _ctx: &Context<'_>) { ... }
}Required Methods§
Provided Methods§
fn events(&self) -> RVec<EventFilter>
fn foreground_services(&self) -> RVec<RString>
fn watch(&mut self, _ctx: &Context<'_>)
fn update(&mut self, _ctx: &Context<'_>, _event: &Event) -> ItemEffect
fn check_view(&self, _ctx: &Context<'_>) -> bool
fn hoverable() -> bool
fn stop(&mut self, _ctx: &Context<'_>)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".