pub struct WatchOptions {
pub interest: Option<Status>,
pub wake_on: Option<Status>,
/* private fields */
}Expand description
Configuration options for battery state watching.
Both fields are optional masks. In both interest and wake_on, the actual field values within
the Status table are ignored; only field presence (set vs. unset) determines the mask.
An absent mask means “use this field’s default”; a present but empty mask means “no fields”.
The two defaults differ because the safe choice differs: interest defaults to everything the
driver supports watching, so a client that never configures anything still makes progress,
while wake_on defaults to nothing, since waking the system is a cost a client must opt into.
Fields§
§interest: Option<Status>Fields the client wants to receive change notifications for.
Defaults to every field the driver supports watching, as reported by
Spec.supported_options. Pass an explicitly empty table to be notified only for the
fields named in wake_on.
wake_on: Option<Status>Fields that should actively wake the system from suspend.
Any field present in wake_on is implicitly included in interest.
Defaults to no fields: changes occurring during suspend are deferred until the next system
wakeup and do not wake the device.
Trait Implementations§
Source§impl Clone for WatchOptions
impl Clone for WatchOptions
Source§fn clone(&self) -> WatchOptions
fn clone(&self) -> WatchOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WatchOptions
impl Debug for WatchOptions
Source§impl<D> Decode<WatchOptions, D> for WatchOptionswhere
D: ResourceDialect,
impl<D> Decode<WatchOptions, D> for WatchOptionswhere
D: ResourceDialect,
Source§fn new_empty() -> WatchOptions
fn new_empty() -> WatchOptions
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl Default for WatchOptions
impl Default for WatchOptions
Source§fn default() -> WatchOptions
fn default() -> WatchOptions
Source§impl<D> Encode<WatchOptions, D> for &WatchOptionswhere
D: ResourceDialect,
impl<D> Encode<WatchOptions, D> for &WatchOptionswhere
D: ResourceDialect,
Source§impl PartialEq for WatchOptions
impl PartialEq for WatchOptions
impl Persistable for WatchOptions
impl StructuralPartialEq for WatchOptions
Source§impl TypeMarker for WatchOptions
impl TypeMarker for WatchOptions
Source§type Owned = WatchOptions
type Owned = WatchOptions
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for WatchOptions
impl ValueTypeMarker for WatchOptions
Source§type Borrowed<'a> = &'a WatchOptions
type Borrowed<'a> = &'a WatchOptions
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<WatchOptions as TypeMarker>::Owned,
) -> <WatchOptions as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<WatchOptions as TypeMarker>::Owned, ) -> <WatchOptions as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.