pub trait ControllerLocalServerHandler<___T: Transport = Channel> {
// Required methods
fn start(
&mut self,
request: Request<Start, ___T>,
responder: Responder<Start, ___T>,
) -> impl Future<Output = ()>;
fn is_started(
&mut self,
responder: Responder<IsStarted, ___T>,
) -> impl Future<Output = ()>;
fn open_exposed_dir(
&mut self,
request: Request<OpenExposedDir, ___T>,
responder: Responder<OpenExposedDir, ___T>,
) -> impl Future<Output = ()>;
fn get_exposed_dictionary(
&mut self,
responder: Responder<GetExposedDictionary, ___T>,
) -> impl Future<Output = ()>;
fn get_output_dictionary(
&mut self,
responder: Responder<GetOutputDictionary, ___T>,
) -> impl Future<Output = ()>;
fn destroy(
&mut self,
responder: Responder<Destroy, ___T>,
) -> impl Future<Output = ()>;
// Provided method
fn on_unknown_interaction(
&mut self,
ordinal: u64,
) -> impl Future<Output = ()> { ... }
}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 = ()>
fn start( &mut self, request: Request<Start, ___T>, responder: Responder<Start, ___T>, ) -> impl Future<Output = ()>
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 = ()>
fn is_started( &mut self, responder: Responder<IsStarted, ___T>, ) -> impl Future<Output = ()>
Returns true if this instance is currently running.
Sourcefn open_exposed_dir(
&mut self,
request: Request<OpenExposedDir, ___T>,
responder: Responder<OpenExposedDir, ___T>,
) -> impl Future<Output = ()>
fn open_exposed_dir( &mut self, request: Request<OpenExposedDir, ___T>, responder: Responder<OpenExposedDir, ___T>, ) -> impl Future<Output = ()>
Opens the exposed directory of the controlled component, through which
capabilities the component exposed via ComponentDecl.exposes are
available, on success.
Binding to the exposed directory requires that the component be resolved, but it will not be started until/unless some capability is requested that requires it to be.
If this component is destroyed, any outstanding connections to
exposed_dir will be closed.
Errors:
INSTANCE_CANNOT_RESOLVE: This component failed to resolve.
Sourcefn get_exposed_dictionary(
&mut self,
responder: Responder<GetExposedDictionary, ___T>,
) -> impl Future<Output = ()>
fn get_exposed_dictionary( &mut self, responder: Responder<GetExposedDictionary, ___T>, ) -> impl Future<Output = ()>
Returns the dictionary containing the component’s exposed capabilities.
Sourcefn get_output_dictionary(
&mut self,
responder: Responder<GetOutputDictionary, ___T>,
) -> impl Future<Output = ()>
fn get_output_dictionary( &mut self, responder: Responder<GetOutputDictionary, ___T>, ) -> impl Future<Output = ()>
Returns a reference to the component’s output dictionary, which may be interacted with by using the fuchsia.component.runtime.Capabilities API.
Sourcefn destroy(
&mut self,
responder: Responder<Destroy, ___T>,
) -> impl Future<Output = ()>
fn destroy( &mut self, responder: Responder<Destroy, ___T>, ) -> impl Future<Output = ()>
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§
fn on_unknown_interaction(&mut self, ordinal: u64) -> impl Future<Output = ()>
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.