pub struct Separator { /* private fields */ }Expand description
A UI component that acts as a separator typically a horizontal line.
Separator components are displayed in the order they are added to a
Container. Each Separator can have a different style, specified using
the SeparatorStyle enum. There are two types of separators available:
normal and dotted.
§Notes
- A normal separator looks like this:
------- - A dotted separator looks like this:
- - - -
§Usage
The Separator component is useful for dividing sections in your terminal UI.
Implementations§
Source§impl Separator
impl Separator
Sourcepub fn normal(style: SeparatorStyle) -> Self
pub fn normal(style: SeparatorStyle) -> Self
Creates a standard (non-dotted) Separator with the given style.
§Parameters
style: The visual style of the separator, specified as aSeparatorStyle.
§Returns
Separator: A new Separator instance.
§Example
// Create a normal separator with a solid style.
let _ = Separator::normal(SeparatorStyle::Solid);Sourcepub fn dotted(style: SeparatorStyle) -> Self
pub fn dotted(style: SeparatorStyle) -> Self
Trait Implementations§
impl Eq for Separator
impl StructuralPartialEq for Separator
Auto Trait Implementations§
impl Freeze for Separator
impl RefUnwindSafe for Separator
impl Send for Separator
impl Sync for Separator
impl Unpin for Separator
impl UnsafeUnpin for Separator
impl UnwindSafe for Separator
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