pub enum ControllerRequest {
Start {
args: StartChildArgs,
execution_controller: ServerEnd<ExecutionControllerMarker>,
responder: ControllerStartResponder,
},
IsStarted {
responder: ControllerIsStartedResponder,
},
OpenExposedDir {
exposed_dir: ServerEnd<DirectoryMarker>,
responder: ControllerOpenExposedDirResponder,
},
GetExposedDictionary {
responder: ControllerGetExposedDictionaryResponder,
},
Destroy {
responder: ControllerDestroyResponder,
},
#[non_exhaustive] _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: StartChildArgsexecution_controller: ServerEnd<ExecutionControllerMarker>responder: ControllerStartResponderIsStarted
Returns true if this instance is currently running.
Fields
responder: ControllerIsStartedResponderOpenExposedDir
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.
GetExposedDictionary
Returns the dictionary containing the component’s exposed capabilities.
Fields
responder: ControllerGetExposedDictionaryResponderDestroy
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.
Fields
responder: ControllerDestroyResponder#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ControllerControlHandlemethod_type: MethodTypeImplementations§
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_open_exposed_dir( self, ) -> Option<(ServerEnd<DirectoryMarker>, ControllerOpenExposedDirResponder)>
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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ControllerRequest
impl !RefUnwindSafe for ControllerRequest
impl Send for ControllerRequest
impl Sync for ControllerRequest
impl Unpin for ControllerRequest
impl !UnwindSafe for ControllerRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]