pub enum ControllerRequest {
Start {
args: StartChildArgs,
execution_controller: ServerEnd<ExecutionControllerMarker>,
responder: ControllerStartResponder,
},
IsStarted {
responder: ControllerIsStartedResponder,
},
GetExposedDictionary {
responder: ControllerGetExposedDictionaryResponder,
},
Destroy {
responder: ControllerDestroyResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: ControllerControlHandle,
method_type: MethodType,
},
}
Expand description
A protocol used to operate on a component.
One may get access to a Controller
when creating a component with the
Realm.CreateChild
method. You may also obtain a Controller
for an
existing child component with the Realm.OpenController
method.
Variants§
Start
Start the component, optionally providing additional handles to be given to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is currently running.
Fields
args: StartChildArgs
execution_controller: ServerEnd<ExecutionControllerMarker>
responder: ControllerStartResponder
IsStarted
Returns true if this instance is currently running.
Fields
responder: ControllerIsStartedResponder
GetExposedDictionary
Returns the dictionary containing the component’s exposed capabilities.
Fields
responder: ControllerGetExposedDictionaryResponder
Destroy
Destroys this component. When this method returns, either:
- Ok was returned, indicating destruction has begun.
- An error was returned, and destruction will not be attempted.
If Ok was returned, destruction will proceed in the background, but it hasn’t necessarily completed yet. When it completes, the framework will close this [Controller] channel.
Errors:
ACCESS_DENIED
: Destruction of this component is not allowed. Currently, this can happen if the component is a static child of its parent.
Fields
responder: ControllerDestroyResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ControllerControlHandle
method_type: MethodType
Implementations§
Source§impl ControllerRequest
impl ControllerRequest
pub fn into_start( self, ) -> Option<(StartChildArgs, ServerEnd<ExecutionControllerMarker>, ControllerStartResponder)>
pub fn into_is_started(self) -> Option<ControllerIsStartedResponder>
pub fn into_get_exposed_dictionary( self, ) -> Option<ControllerGetExposedDictionaryResponder>
pub fn into_destroy(self) -> Option<ControllerDestroyResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL