Trait ComponentControllerServerHandler

Source
pub trait ComponentControllerServerHandler<___T: Transport> {
    // Required methods
    fn stop(
        &mut self,
        sender: &ServerSender<ComponentController, ___T>,
    ) -> impl Future<Output = ()> + Send;
    fn kill(
        &mut self,
        sender: &ServerSender<ComponentController, ___T>,
    ) -> impl Future<Output = ()> + Send;

    // Provided method
    fn on_unknown_interaction(
        &mut self,
        sender: &ServerSender<ComponentController, ___T>,
        ordinal: u64,
    ) -> impl Future<Output = ()> + Send { ... }
}
Expand description

A server handler for the ComponentController protocol.

See ComponentController for more details.

Required Methods§

Source

fn stop( &mut self, sender: &ServerSender<ComponentController, ___T>, ) -> impl Future<Output = ()> + Send

Request to stop the component instance.

After stopping the component instance, the server should close this connection with an epitaph. After the connection closes, component manager considers this component instance to be Stopped and the component’s namespace will be torn down.

Source

fn kill( &mut self, sender: &ServerSender<ComponentController, ___T>, ) -> impl Future<Output = ()> + Send

Stop this component instance immediately.

The ComponentRunner must immediately kill the component instance, and then close this connection with an epitaph. After the connection closes, component manager considers this component instance to be Stopped and the component’s namespace will be torn down.

In some cases Kill() may be issued before Stop(), but that is not guaranteed.

Provided Methods§

Source

fn on_unknown_interaction( &mut self, sender: &ServerSender<ComponentController, ___T>, ordinal: u64, ) -> impl Future<Output = ()> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§