ControllerServerHandler

Trait ControllerServerHandler 

Source
pub trait ControllerServerHandler<___T: Transport = Channel> {
    // Required methods
    fn start(
        &mut self,
        request: Request<Start, ___T>,
        responder: Responder<Start, ___T>,
    ) -> impl Future<Output = ()> + Send;
    fn is_started(
        &mut self,
        responder: Responder<IsStarted, ___T>,
    ) -> impl Future<Output = ()> + Send;
    fn get_exposed_dictionary(
        &mut self,
        responder: Responder<GetExposedDictionary, ___T>,
    ) -> impl Future<Output = ()> + Send;
    fn destroy(
        &mut self,
        responder: Responder<Destroy, ___T>,
    ) -> impl Future<Output = ()> + Send;

    // Provided method
    fn on_unknown_interaction(
        &mut self,
        ordinal: u64,
    ) -> impl Future<Output = Result<(), ProtocolError<<___T as Transport>::Error>>> + Send { ... }
}
Expand description

A server handler for the Controller protocol.

See Controller for more details.

Required Methods§

Source

fn start( &mut self, request: Request<Start, ___T>, responder: Responder<Start, ___T>, ) -> impl Future<Output = ()> + Send

Start the component, optionally providing additional handles to be given to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is currently running.

Source

fn is_started( &mut self, responder: Responder<IsStarted, ___T>, ) -> impl Future<Output = ()> + Send

Returns true if this instance is currently running.

Source

fn get_exposed_dictionary( &mut self, responder: Responder<GetExposedDictionary, ___T>, ) -> impl Future<Output = ()> + Send

Returns the dictionary containing the component’s exposed capabilities.

Source

fn destroy( &mut self, responder: Responder<Destroy, ___T>, ) -> impl Future<Output = ()> + Send

Destroys this component. When this method returns, the component is either destroyed or in the case of an error no destruction happened.

Errors:

  • ACCESS_DENIED: Destruction of this component is not allowed. Currently, this can happen if the component is a static child of its parent.
  • INTERNAL: Something prevented destruction from succeeding – component manager’s logs will contain more detail.

Provided Methods§

Source

fn on_unknown_interaction( &mut self, ordinal: u64, ) -> impl Future<Output = Result<(), ProtocolError<<___T as Transport>::Error>>> + 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§