pub struct DashboardFragment {
pub rows: Vec<DashboardRow>,
}Expand description
One section’s rendered contribution: an ordered list of visual lines.
Fields§
§rows: Vec<DashboardRow>Implementations§
Source§impl DashboardFragment
impl DashboardFragment
pub fn new() -> Self
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
True when the section rendered nothing (all sections should render at least one row; an empty fragment is a section bug the registry tests guard against).
Sourcepub fn push(&mut self, row: DashboardRow) -> &mut Self
pub fn push(&mut self, row: DashboardRow) -> &mut Self
Push a whole row.
Sourcepub fn line(
&mut self,
text: impl Into<String>,
role: DashboardRole,
) -> &mut Self
pub fn line( &mut self, text: impl Into<String>, role: DashboardRole, ) -> &mut Self
Convenience: a single left-aligned span of one role.
Trait Implementations§
Source§impl Clone for DashboardFragment
impl Clone for DashboardFragment
Source§fn clone(&self) -> DashboardFragment
fn clone(&self) -> DashboardFragment
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 DashboardFragment
impl Debug for DashboardFragment
Source§impl Default for DashboardFragment
impl Default for DashboardFragment
Source§fn default() -> DashboardFragment
fn default() -> DashboardFragment
Returns the “default value” for a type. Read more
impl Eq for DashboardFragment
Source§impl PartialEq for DashboardFragment
impl PartialEq for DashboardFragment
impl StructuralPartialEq for DashboardFragment
Auto Trait Implementations§
impl Freeze for DashboardFragment
impl RefUnwindSafe for DashboardFragment
impl Send for DashboardFragment
impl Sync for DashboardFragment
impl Unpin for DashboardFragment
impl UnsafeUnpin for DashboardFragment
impl UnwindSafe for DashboardFragment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.