pub struct Spec {
pub design_capacity_uah: Option<u32>,
pub design_voltage_uv: Option<u32>,
pub chemistry: Option<String>,
pub model: Option<String>,
pub supported_options: Option<WatchOptions>,
/* private fields */
}Expand description
Static hardware characteristics and driver capabilities.
Fields§
§design_capacity_uah: Option<u32>Optional. Design capacity in microamp-hours. Omitted if unsupported by hardware.
design_voltage_uv: Option<u32>Optional. Nominal design voltage in microvolts. Omitted if unsupported by hardware.
chemistry: Option<String>Optional. Informational battery chemistry description (e.g. “Li-ion”, “LiFePO4”, “NiMH”). Omitted if unknown or unprogrammed in hardware.
model: Option<String>Optional. Informational battery model string or manufacturer part number. Omitted if unknown or unprogrammed in hardware.
supported_options: Option<WatchOptions>Required. The interest and wake options supported by this driver/hardware.
Drivers must populate this table so clients know which fields support active change notifications. If omitted by the driver, clients should assume no active interrupt watching is supported.
supported_options.interest: Telemetry fields that can actively trigger hanging-get watch notifications on change. Fields omitted are passive measurements that do not generate hardware interrupts; their freshest values are returned during active state changes or via [Battery.GetStatus].supported_options.wake_on: Telemetry fields capable of actively waking the system from suspend via hardware interrupt lines etc.
Trait Implementations§
Source§impl<D> Decode<Spec, D> for Specwhere
D: ResourceDialect,
impl<D> Decode<Spec, D> for Specwhere
D: ResourceDialect,
impl Persistable for Spec
impl StructuralPartialEq for Spec
Source§impl TypeMarker for Spec
impl TypeMarker for Spec
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
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
Returns true if the memory layout of
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 Spec
impl ValueTypeMarker for Spec
Source§type Borrowed<'a> = &'a Spec
type Borrowed<'a> = &'a Spec
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<Spec as TypeMarker>::Owned,
) -> <Spec as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<Spec as TypeMarker>::Owned, ) -> <Spec as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned to Self::Borrowed.Auto Trait Implementations§
impl Freeze for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnsafeUnpin for Spec
impl UnwindSafe for Spec
Blanket Implementations§
Source§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
Source§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
Source§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
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