pub struct LineGauge<'a> { /* private fields */ }Expand description
Single-line gauge builder. Auto-renders on Drop.
Constructed via Context::line_gauge. Chainable methods configure the
gauge before it renders. Drop to render without capturing a response, or
call Self::show to render and obtain a GaugeResponse.
Drop is intentional: ui.line_gauge(0.5).filled('━'); is the idiomatic
form when the response isn’t needed.
Implementations§
Source§impl<'a> LineGauge<'a>
impl<'a> LineGauge<'a>
Sourcepub fn label(self, label: impl Into<String>) -> Self
pub fn label(self, label: impl Into<String>) -> Self
Set the trailing label, appended after the bar.
Accepts both &str and owned String via impl Into<String> so
callers with already-owned strings (e.g. format!(...)) don’t pay a
redundant clone.
Sourcepub fn show(self) -> GaugeResponse
pub fn show(self) -> GaugeResponse
Render now and return the GaugeResponse.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for LineGauge<'a>
impl<'a> !RefUnwindSafe for LineGauge<'a>
impl<'a> !Send for LineGauge<'a>
impl<'a> !Sync for LineGauge<'a>
impl<'a> Unpin for LineGauge<'a>
impl<'a> UnsafeUnpin for LineGauge<'a>
impl<'a> !UnwindSafe for LineGauge<'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
Mutably borrows from an owned value. Read more