pub struct DividerProps {
pub width: Option<usize>,
pub style: DividerStyle,
pub color: Option<Color>,
pub dim: bool,
pub label: Option<String>,
pub label_color: Option<Color>,
}Expand description
Properties for the Divider component.
Fields§
§width: Option<usize>Width of the divider (in characters). None = 20 default.
style: DividerStyleStyle of the line.
color: Option<Color>Color of the line.
dim: boolWhether to dim the line.
label: Option<String>Optional label in the middle of the divider.
label_color: Option<Color>Label color (defaults to line color).
Implementations§
Source§impl DividerProps
impl DividerProps
Sourcepub fn line_style(self, style: DividerStyle) -> Self
pub fn line_style(self, style: DividerStyle) -> Self
Set the line style.
Sourcepub fn label_color(self, color: Color) -> Self
pub fn label_color(self, color: Color) -> Self
Set the label color.
Sourcepub fn render_string(&self) -> String
pub fn render_string(&self) -> String
Build the display string.
Trait Implementations§
Source§impl Clone for DividerProps
impl Clone for DividerProps
Source§fn clone(&self) -> DividerProps
fn clone(&self) -> DividerProps
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 DividerProps
impl Debug for DividerProps
Auto Trait Implementations§
impl Freeze for DividerProps
impl RefUnwindSafe for DividerProps
impl Send for DividerProps
impl Sync for DividerProps
impl Unpin for DividerProps
impl UnwindSafe for DividerProps
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