pub struct SummaryField { /* private fields */ }Implementations§
Source§impl SummaryField
impl SummaryField
Sourcepub fn new(label: impl Into<String>, value: impl Into<String>) -> Self
pub fn new(label: impl Into<String>, value: impl Into<String>) -> Self
Creates one labelled field.
label and value are plain text. Escape sequences and cursor movement in it break that contract:
debug builds panic, and release builds measure them as ordinary
characters and may split them when wrapping or truncating. Raw ANSI is not accepted as component text.
Style the component through its CliTheme rather
than by pre-rendering its content.
pub fn label(&self) -> &str
pub fn value(&self) -> &str
Trait Implementations§
Source§impl Clone for SummaryField
impl Clone for SummaryField
Source§fn clone(&self) -> SummaryField
fn clone(&self) -> SummaryField
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 SummaryField
impl Debug for SummaryField
Source§impl PartialEq for SummaryField
impl PartialEq for SummaryField
Source§fn eq(&self, other: &SummaryField) -> bool
fn eq(&self, other: &SummaryField) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SummaryField
impl StructuralPartialEq for SummaryField
Auto Trait Implementations§
impl Freeze for SummaryField
impl RefUnwindSafe for SummaryField
impl Send for SummaryField
impl Sync for SummaryField
impl Unpin for SummaryField
impl UnsafeUnpin for SummaryField
impl UnwindSafe for SummaryField
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