pub struct GridHeader { /* private fields */ }Expand description
GridHeader encapsulates the properties of a header, such as priority and padding information. This is typically constructed by crate::header! and is not constructed directly.
Several methods can adjust the content of the header after the fact, and should be reviewed.
Implementations§
Source§impl GridHeader
impl GridHeader
Sourcepub fn set_max_len(&mut self, len: usize)
pub fn set_max_len(&mut self, len: usize)
Set the maximum length of items belonging to this header.
Sourcepub fn set_priority(self, priority: usize) -> Self
pub fn set_priority(self, priority: usize) -> Self
Set the priority of this header. Higher priority items will be more likely to be shown on smaller terminal sizes.
Sourcepub fn set_index(&mut self, idx: usize)
pub fn set_index(&mut self, idx: usize)
Set the position this header lives within the column list. 0 is the first position.
pub fn text(&self) -> &str
pub fn priority(&self) -> usize
Trait Implementations§
Source§impl Clone for GridHeader
impl Clone for GridHeader
Source§fn clone(&self) -> GridHeader
fn clone(&self) -> GridHeader
Returns a duplicate of the value. Read more
1.0.0 · 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 GridHeader
impl Debug for GridHeader
Source§impl Default for GridHeader
impl Default for GridHeader
Source§impl Ord for GridHeader
impl Ord for GridHeader
Source§impl PartialEq for GridHeader
impl PartialEq for GridHeader
Source§impl PartialOrd for GridHeader
impl PartialOrd for GridHeader
impl Eq for GridHeader
impl StructuralPartialEq for GridHeader
Auto Trait Implementations§
impl Freeze for GridHeader
impl RefUnwindSafe for GridHeader
impl Send for GridHeader
impl Sync for GridHeader
impl Unpin for GridHeader
impl UnwindSafe for GridHeader
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