[][src]Trait kompact::component::ComponentLifecycle

pub trait ComponentLifecycle: ComponentLogging {
    fn on_start(&mut self) -> Handled
    where
        Self: 'static
, { ... }
fn on_stop(&mut self) -> Handled
    where
        Self: 'static
, { ... }
fn on_kill(&mut self) -> Handled
    where
        Self: 'static
, { ... } }

A trait to customise handling of lifecycle events

This trait replaces the pre-v0.9 Provide<ControlPort> requirement.

Provided methods

fn on_start(&mut self) -> Handled where
    Self: 'static, 

Gets invoked every time a component receives a Start event

The default implementation simply logs something at debug level.

fn on_stop(&mut self) -> Handled where
    Self: 'static, 

Gets invoked every time a component receives a Stop event

The default implementation simply logs something at debug level.

fn on_kill(&mut self) -> Handled where
    Self: 'static, 

Gets invoked every time a component receives a Kill event

The default implementation simply logs something at debug level.

Loading content...

Implementors

impl ComponentLifecycle for DeadletterBox[src]

impl ComponentLifecycle for LocalDispatcher[src]

impl ComponentLifecycle for TestComponent1[src]

impl ComponentLifecycle for TestComponent2[src]

impl ComponentLifecycle for BigPingerAct[src]

impl ComponentLifecycle for BigPongerAct[src]

impl ComponentLifecycle for ForwarderAct[src]

impl ComponentLifecycle for PingerAct[src]

impl ComponentLifecycle for PongerAct[src]

impl ComponentLifecycle for NetworkDispatcher[src]

Loading content...