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 = ()> + Send { ... }
}Expand description
A server handler for the Controller protocol.
See Controller for more details.
Required Methods§
Sourcefn start(
&mut self,
request: Request<Start, ___T>,
responder: Responder<Start, ___T>,
) -> impl Future<Output = ()> + Send
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.
Sourcefn is_started(
&mut self,
responder: Responder<IsStarted, ___T>,
) -> impl Future<Output = ()> + Send
fn is_started( &mut self, responder: Responder<IsStarted, ___T>, ) -> impl Future<Output = ()> + Send
Returns true if this instance is currently running.
Sourcefn get_exposed_dictionary(
&mut self,
responder: Responder<GetExposedDictionary, ___T>,
) -> impl Future<Output = ()> + Send
fn get_exposed_dictionary( &mut self, responder: Responder<GetExposedDictionary, ___T>, ) -> impl Future<Output = ()> + Send
Returns the dictionary containing the component’s exposed capabilities.
Sourcefn destroy(
&mut self,
responder: Responder<Destroy, ___T>,
) -> impl Future<Output = ()> + Send
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§
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.