Skip to main content

ComponentObject

Trait ComponentObject 

Source
pub trait ComponentObject: Send + 'static {
    // Required 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 stop(&mut self, ctx: &Context<'_>);
    fn view(&self, ctx: &Context<'_>) -> Node;
}

Required Methods§

Source

fn events(&self) -> RVec<EventFilter>

Source

fn foreground_services(&self) -> RVec<RString>

Source

fn watch(&mut self, ctx: &Context<'_>)

Source

fn update(&mut self, ctx: &Context<'_>, event: &Event) -> ItemEffect

Source

fn check_view(&self, ctx: &Context<'_>) -> bool

Source

fn stop(&mut self, ctx: &Context<'_>)

Source

fn view(&self, ctx: &Context<'_>) -> Node

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<_ErasedPtr> ComponentObject for ComponentObject_TO<_ErasedPtr>
where Self: Send + 'static, _ErasedPtr: AsMutPtr<PtrTarget = ()>,