pub enum ElementControlRequest {
OpenStatusChannel {
status_channel: ServerEnd<StatusMarker>,
control_handle: ElementControlControlHandle,
},
RegisterDependencyToken {
token: Event,
responder: ElementControlRegisterDependencyTokenResponder,
},
UnregisterDependencyToken {
token: Event,
responder: ElementControlUnregisterDependencyTokenResponder,
},
AddDependency {
dependent_level: u8,
requires_token: Event,
requires_level_by_preference: Vec<u8>,
responder: ElementControlAddDependencyResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: ElementControlControlHandle,
method_type: MethodType,
},
}Expand description
Provides element-scoped access to an element previously added via Topology.AddElement.
Variants§
OpenStatusChannel
Register a new Status channel on which Power Broker will send read-only updates of the element’s current power level. This method is intended to allow element owners to give read-only access to the element’s current power level to clients by opening and transferring this channel.
RegisterDependencyToken
Register a token which will permit the bearer to add either a dependency upon this element.
UnregisterDependencyToken
Unregister a token previously registered via RegisterDependencyToken.
AddDependency
Add a new dependency to an existing element. If any open leases would incorporate this dependency, the required element and any transitively required elements must complete all necessary transitions (via ElementRunner.SetLevel calls) before this method will return.
Fields
responder: ElementControlAddDependencyResponder#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ElementControlControlHandlemethod_type: MethodTypeImplementations§
Source§impl ElementControlRequest
impl ElementControlRequest
pub fn into_open_status_channel( self, ) -> Option<(ServerEnd<StatusMarker>, ElementControlControlHandle)>
pub fn into_register_dependency_token( self, ) -> Option<(Event, ElementControlRegisterDependencyTokenResponder)>
pub fn into_unregister_dependency_token( self, ) -> Option<(Event, ElementControlUnregisterDependencyTokenResponder)>
pub fn into_add_dependency( self, ) -> Option<(u8, Event, Vec<u8>, ElementControlAddDependencyResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL