pub struct WindowRow {
pub marker_pct: Option<i32>,
pub glyph: Option<&'static str>,
}Expand description
Optional decorations for a push_window row. Default reproduces the
plain row every vendor drew before pacing reached the tooltip: bar +
percentage, then ⏱ Resets in ….
glyph is inserted into Pango markup as-is, so a caller passing anything
vendor-reported must escape it first.
Fields§
§marker_pct: Option<i32>Elapsed-time marker drawn inside the bar (--tooltip-pace-pts).
glyph: Option<&'static str>Pace glyph appended after the bold percentage (↑ / → / ↓).
Implementations§
Source§impl WindowRow
impl WindowRow
Sourcepub fn paced(
w: &UsageWindow,
now: DateTime<Utc>,
tolerance: u32,
point_mode: bool,
) -> Self
pub fn paced( w: &UsageWindow, now: DateTime<Utc>, tolerance: u32, point_mode: bool, ) -> Self
The Anthropic tooltip’s pace convention in one place (mirrors
widget::render::pick_pace_glyph): the ratio glyph by default, and with
point_mode (--tooltip-pace-pts) the point-delta glyph plus the
elapsed marker inside the bar.
A window with no reported reset degrades to pacing::Pacing::neutral(),
so it still gets a → rather than a blank where every sibling row has
a glyph.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WindowRow
impl RefUnwindSafe for WindowRow
impl Send for WindowRow
impl Sync for WindowRow
impl Unpin for WindowRow
impl UnsafeUnpin for WindowRow
impl UnwindSafe for WindowRow
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more