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§impl Debug for WatchOptions
impl Debug for WatchOptions
Source§impl<D: ResourceDialect> Decode<WatchOptions, D> for WatchOptions
impl<D: ResourceDialect> Decode<WatchOptions, D> for WatchOptions
Source§impl Default for WatchOptions
impl Default for WatchOptions
Source§impl<D: ResourceDialect> Encode<WatchOptions, D> for &WatchOptions
impl<D: ResourceDialect> Encode<WatchOptions, D> for &WatchOptions
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 more