pub enum BatteryRequest {
GetSpec {
responder: BatteryGetSpecResponder,
},
GetStatus {
responder: BatteryGetStatusResponder,
},
Watch {
interest: Status,
wake_on: Status,
lease: Option<EventPair>,
responder: BatteryWatchResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: BatteryControlHandle,
method_type: MethodType,
},
}Expand description
Protocol representing the Battery (acting as the Fuel Gauge).
This protocol focuses on reading the chemical telemetry of the cell pack.
Charging operations are managed separately via [fuchsia.hardware.power.charger/Charger].
Variants§
GetSpec
Returns the spec immediately.
Fields
§
responder: BatteryGetSpecResponderGetStatus
Returns the status immediately.
Fields
§
responder: BatteryGetStatusResponderWatch
Hanging get for status updates.
See [fuchsia.hardware.power.source/Source.Watch] for semantics.
#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: BatteryControlHandle§
method_type: MethodTypeImplementations§
Source§impl BatteryRequest
impl BatteryRequest
pub fn into_get_spec(self) -> Option<BatteryGetSpecResponder>
pub fn into_get_status(self) -> Option<BatteryGetStatusResponder>
pub fn into_watch( self, ) -> Option<(Status, Status, Option<EventPair>, BatteryWatchResponder)>
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 BatteryRequest
impl !RefUnwindSafe for BatteryRequest
impl Send for BatteryRequest
impl Sync for BatteryRequest
impl Unpin for BatteryRequest
impl UnsafeUnpin for BatteryRequest
impl !UnwindSafe for BatteryRequest
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
Mutably borrows from an owned value. Read more