pub trait Controllable {
    // Required methods
    fn kill<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stop<'a>(&mut self) -> BoxFuture<'a, ()>;

    // Provided methods
    fn teardown<'a>(&mut self) -> BoxFuture<'a, ()> { ... }
    fn on_escrow<'a>(&self) -> BoxStream<'a, ComponentControllerOnEscrowRequest> { ... }
}
Expand description

Object implementing this type can be killed by calling kill function.

Required Methods§

source

fn kill<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Should kill self and do cleanup. Should not return error or panic, should log error instead.

source

fn stop<'a>(&mut self) -> BoxFuture<'a, ()>

Stop the component. Once the component is stopped, the ComponentControllerControlHandle should be closed. If the component is not stopped quickly enough, kill will be called. The amount of time stop is allowed may vary based on a variety of factors.

Provided Methods§

source

fn teardown<'a>(&mut self) -> BoxFuture<'a, ()>

Perform any teardown tasks before closing the controller channel.

source

fn on_escrow<'a>(&self) -> BoxStream<'a, ComponentControllerOnEscrowRequest>

Monitor any escrow requests from the component.

Implementors§