pub enum ClientConfiguratorRequest {
Get {
client_type: ClientType,
responder: ClientConfiguratorGetResponder,
},
Set {
client_type: ClientType,
config: ClientConfig,
responder: ClientConfiguratorSetResponder,
},
}
Expand description
A protocol that can be used to update the power configuration for a given
[ClientType
].
Variants§
Get
Gets the power configuration for the given [ClientType
].
If there is no power configuration for client_type
then the returned
value will be absent.
client_type
specifies which [ClientType
]ClientConfig
to get
config
is the returned client-specific configuration, or an absent value ifclient_type
does not have an existing configuration
Set
Sets the power configuration for the given [ClientType
].
This method should be used in tandem with [GetConfig
] in order to
update the existing power configuration for a given [ClientType
]
without fully overwriting it.
When the power configuration for a given [ClientType
] is changed, the
Power Manager will reevaluate current power level of that [ClientType
]
according to the new configuration. This reevaluation may result in a
new power level being sent to the connected client.
The call returns immediately after the new config has been received and validated. Actual system changes to be applied as a result of changing a client’s configuration will occur after the call has returned. Therefore, any errors that occur while updating clients according to the new system power mode are not propagated back to the caller. Instead, client updates are applied on a “best effort” basis.
If the provided config
is not valid, then no changes will be applied
and the channel will be closed. Validation will fail if a given
SystemMode
is repeated across multiple mode_match
entries contained
by the ClientConfig
.
client_type
specifies which [ClientType
]’sClientConfig
to setconfig
is theClientConfig
that will be set for [client_type
]
Implementations§
Source§impl ClientConfiguratorRequest
impl ClientConfiguratorRequest
pub fn into_get(self) -> Option<(ClientType, ClientConfiguratorGetResponder)>
pub fn into_set( self, ) -> Option<(ClientType, ClientConfig, ClientConfiguratorSetResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL