pub enum SourceRequest {
GetPowerInfo {
responder: SourceGetPowerInfoResponder,
},
GetStateChangeEvent {
responder: SourceGetStateChangeEventResponder,
},
GetBatteryInfo {
responder: SourceGetBatteryInfoResponder,
},
}
Variants§
GetPowerInfo
Get device info.
Fields
§
responder: SourceGetPowerInfoResponder
GetStateChangeEvent
Get an event to receive state change notifications on. ZX_USER_SIGNAL_0 is
asserted when power info or battery info changes. ZX_USER_SIGNAL_0 is
reset when either GetPowerInfo()
or GetBatteryInfo()
is called.
Fields
§
responder: SourceGetStateChangeEventResponder
GetBatteryInfo
Get battery info. Only supported if type == PowerType::BATTERY.
Fields
§
responder: SourceGetBatteryInfoResponder
Implementations§
Source§impl SourceRequest
impl SourceRequest
pub fn into_get_power_info(self) -> Option<SourceGetPowerInfoResponder>
pub fn into_get_state_change_event( self, ) -> Option<SourceGetStateChangeEventResponder>
pub fn into_get_battery_info(self) -> Option<SourceGetBatteryInfoResponder>
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 SourceRequest
impl !RefUnwindSafe for SourceRequest
impl Send for SourceRequest
impl Sync for SourceRequest
impl Unpin for SourceRequest
impl !UnwindSafe for SourceRequest
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