Skip to main content

IComponent

Trait IComponent 

Source
pub trait IComponent {
    type Metadata;

    // Required methods
    fn props(&self) -> Self::Metadata;
    fn status(&self) -> Self::Metadata;
    fn started(&self) -> bool;
    fn stopped(&self) -> bool;
    fn start(&mut self);
    fn stop(&mut self);

    // Provided methods
    fn kill(&mut self) { ... }
    fn remote(&self) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn props(&self) -> Self::Metadata

Source

fn status(&self) -> Self::Metadata

Source

fn started(&self) -> bool

Source

fn stopped(&self) -> bool

Source

fn start(&mut self)

Source

fn stop(&mut self)

Provided Methods§

Source

fn kill(&mut self)

Source

fn remote(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§