pub struct StatusModel<'a> {
pub device_name: &'a str,
pub battery: BatteryIndicator,
pub battery_mv: Option<u16>,
pub link: LinkState,
pub bonds: u8,
pub pairing: PairingState,
pub stats: StatsModel,
pub clock: Option<ClockModel>,
}Expand description
Everything drawn that is not menu state.
The firmware assembles this immediately before rendering — the device name in particular comes from an async read, which is why it arrives as a borrowed string rather than being fetched here.
Fields§
§device_name: &'a str§battery: BatteryIndicator§battery_mv: Option<u16>Pack voltage for the status page’s diagnostic row. The header icon is the glanceable reading; this is the one to quote in a bug report.
link: LinkState§bonds: u8How many companions are bonded. Shown only on the clear-bonds confirmation, where it says what is about to be destroyed; on the status page it was a number nobody was deciding anything with. Running out of slots surfaces as a pairing failure, which is the moment the capacity matters.
pairing: PairingState§stats: StatsModel§clock: Option<ClockModel>The local time to show in the header, or None when the device
does not know what time it is.
None draws nothing at all — not a placeholder, not dashes, not a
zeroed clock. A device that does not know the time must not
indicate one, and enforcing that here rather than in each panel is
what keeps it true: there is no way to render a clock without a
reading to render.
Trait Implementations§
Source§impl<'a> Clone for StatusModel<'a>
impl<'a> Clone for StatusModel<'a>
Source§fn clone(&self) -> StatusModel<'a>
fn clone(&self) -> StatusModel<'a>
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for StatusModel<'a>
impl<'a> Debug for StatusModel<'a>
impl<'a> Copy for StatusModel<'a>
Auto Trait Implementations§
impl<'a> Freeze for StatusModel<'a>
impl<'a> RefUnwindSafe for StatusModel<'a>
impl<'a> Send for StatusModel<'a>
impl<'a> Sync for StatusModel<'a>
impl<'a> Unpin for StatusModel<'a>
impl<'a> UnwindSafe for StatusModel<'a>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)