pub enum RequesterRequest {
Request {
mode: SystemMode,
set: bool,
responder: RequesterRequestResponder,
},
}
Expand description
A protocol that can be used to request a change to the currently active system power modes.
Variants§
Request
Requests to set or clear a system power mode.
The call returns immediately after the request has been received, validated, and accepted. Actual system changes to be applied as a result of this request 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.
An error returned by this method means the request itself is not valid and was rejected. Details of the specific rejection reason are reflected by the error value. In the event of an error, the channel will remain open.
A client can use this method to set or clear system power mode variants independently. For example:
// battery is below the “low” threshold Request(LOW_BATTERY, true);
// device is now plugged into the wall Request(ON_AC_POWER, true);
// battery is now above the “low” threshold Request(LOW_BATTERY, false);
mode
is theSystemMode
to request to be set or clearedset
should be true to request to setmode
, or false to clear it
- error a
ModeRequestError
value indicating why the request was rejected.
Implementations§
Source§impl RequesterRequest
impl RequesterRequest
pub fn into_request( self, ) -> Option<(SystemMode, bool, RequesterRequestResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL