pub struct Rule {
pub title: String,
pub characters: String,
pub style: Style,
pub end: String,
pub align: AlignMethod,
}Expand description
A horizontal rule (divider) with an optional title.
Fields§
§title: StringOptional title text.
characters: StringCharacter(s) used for the line.
style: StyleStyle for the rule line.
end: StringText appended after the rule.
align: AlignMethodAlignment of the title.
Implementations§
Source§impl Rule
impl Rule
Sourcepub fn characters(self, chars: impl Into<String>) -> Self
pub fn characters(self, chars: impl Into<String>) -> Self
Builder: set the characters.
Sourcepub fn align(self, align: AlignMethod) -> Self
pub fn align(self, align: AlignMethod) -> Self
Builder: set the alignment.
Trait Implementations§
Source§impl Renderable for Rule
impl Renderable for Rule
Source§fn render(&self, options: &ConsoleOptions) -> RenderResult
fn render(&self, options: &ConsoleOptions) -> RenderResult
Render this object into a
RenderResult using the provided options. Read moreSource§fn measure(&self, _options: &ConsoleOptions) -> Option<Measurement>
fn measure(&self, _options: &ConsoleOptions) -> Option<Measurement>
Optional width-measurement hook (equivalent to
__rich_measure__).
Override to provide min/max width constraints for layout.Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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