pub struct BoxStyle {
pub top_left: char,
pub top_right: char,
pub bottom_left: char,
pub bottom_right: char,
pub horizontal: char,
pub vertical: char,
pub left_tee: char,
pub right_tee: char,
pub top_tee: char,
pub bottom_tee: char,
pub cross: char,
}Expand description
Box drawing character sets for panels and tables.
Supports multiple styles from minimal ASCII to decorative Unicode.
§Example
use fastapi_output::themes::BoxStyle;
let style = BoxStyle::rounded();
println!("{}{}{}", style.top_left, style.horizontal, style.top_right);
// ╭─╮Fields§
§top_left: charTop-left corner character.
top_right: charTop-right corner character.
bottom_left: charBottom-left corner character.
bottom_right: charBottom-right corner character.
horizontal: charHorizontal line character.
vertical: charVertical line character.
left_tee: charLeft T-junction for tables.
right_tee: charRight T-junction for tables.
top_tee: charTop T-junction for tables.
bottom_tee: charBottom T-junction for tables.
cross: charCross/plus for table intersections.
Implementations§
Source§impl BoxStyle
impl BoxStyle
Sourcepub fn horizontal_line(&self, width: usize) -> String
pub fn horizontal_line(&self, width: usize) -> String
Draw a horizontal line of the specified width.
Sourcepub fn top_border(&self, width: usize) -> String
pub fn top_border(&self, width: usize) -> String
Draw a complete top border with corners.
Sourcepub fn bottom_border(&self, width: usize) -> String
pub fn bottom_border(&self, width: usize) -> String
Draw a complete bottom border with corners.
Trait Implementations§
impl Copy for BoxStyle
impl Eq for BoxStyle
impl StructuralPartialEq for BoxStyle
Auto Trait Implementations§
impl Freeze for BoxStyle
impl RefUnwindSafe for BoxStyle
impl Send for BoxStyle
impl Sync for BoxStyle
impl Unpin for BoxStyle
impl UnsafeUnpin for BoxStyle
impl UnwindSafe for BoxStyle
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