pub struct StatusBar<'a> {
pub mode: Mode,
pub engine: &'a EngineState,
pub theme: Theme,
pub now: DateTime<Utc>,
pub rate_budget: Option<BudgetSnapshot>,
}Fields§
§mode: Mode§engine: &'a EngineState§theme: Theme§now: DateTime<Utc>Wall-clock “now” for freshness math. Callers from live
render pass Utc::now(); tests pass a frozen instant so
snapshots stay stable.
rate_budget: Option<BudgetSnapshot>CLI-side RateBudget snapshot, re-read each frame by the
render pass. None means “no bucket attached” (test
harnesses, early bootstrap) — the widget renders rate:?
in metadata color. The live binary always attaches one
(zero::build_client), so operators see a number from the
first frame.
Implementations§
Source§impl StatusBar<'_>
impl StatusBar<'_>
Sourcepub fn pick_tier(&self, available_width: u16) -> Tier
pub fn pick_tier(&self, available_width: u16) -> Tier
Pick the widest tier whose rendered width fits inside
available_width. Minimal is the absolute floor and is
never rejected by the width check — if even Minimal overflows,
it still renders (and crops naturally at area.right() via
ratatui’s Line::render), because “mode + ops + dd” at any
truncation is still more useful than a blank bar.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for StatusBar<'a>
impl<'a> RefUnwindSafe for StatusBar<'a>
impl<'a> Send for StatusBar<'a>
impl<'a> Sync for StatusBar<'a>
impl<'a> Unpin for StatusBar<'a>
impl<'a> UnsafeUnpin for StatusBar<'a>
impl<'a> UnwindSafe for StatusBar<'a>
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> 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