pub struct GlanceCard {
pub title: String,
pub metric: Option<GlanceMetric>,
pub action: Option<GlanceAction>,
pub urgency: String,
pub cells: u16,
pub bypass_budget: bool,
}Expand description
A single portable card for HUD, watch, and other tiny display surfaces.
Fields§
§title: StringThe card title.
metric: Option<GlanceMetric>Optional single metric row.
action: Option<GlanceAction>Optional single action row.
urgency: StringUrgency token such as info, warn, or error.
cells: u16Abstract cell budget, not a device unit.
bypass_budget: boolWhether safety-critical content bypasses local trimming.
Implementations§
Source§impl GlanceCard
impl GlanceCard
Sourcepub fn new(
title: impl Into<String>,
metric: Option<GlanceMetric>,
action: Option<GlanceAction>,
urgency: impl Into<String>,
cells: u16,
) -> Self
pub fn new( title: impl Into<String>, metric: Option<GlanceMetric>, action: Option<GlanceAction>, urgency: impl Into<String>, cells: u16, ) -> Self
Builds a card with optional metric/action rows.
Sourcepub fn with_budget_bypass(self, bypass: bool) -> Self
pub fn with_budget_bypass(self, bypass: bool) -> Self
Marks this card as exempt from local glyph trimming.
Sourcepub fn from_scene(expr: &Expr) -> Result<Self>
pub fn from_scene(expr: &Expr) -> Result<Self>
Reads a scene/glance node back into a typed card.
Trait Implementations§
Source§impl Clone for GlanceCard
impl Clone for GlanceCard
Source§fn clone(&self) -> GlanceCard
fn clone(&self) -> GlanceCard
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GlanceCard
impl Debug for GlanceCard
Source§impl PartialEq for GlanceCard
impl PartialEq for GlanceCard
impl StructuralPartialEq for GlanceCard
Auto Trait Implementations§
impl Freeze for GlanceCard
impl RefUnwindSafe for GlanceCard
impl Send for GlanceCard
impl Sync for GlanceCard
impl Unpin for GlanceCard
impl UnsafeUnpin for GlanceCard
impl UnwindSafe for GlanceCard
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