pub struct BorderStyle {
pub corner_top_left: Pixel,
pub corner_top_right: Pixel,
pub corner_bottom_left: Pixel,
pub corner_bottom_right: Pixel,
pub top_bottom: Pixel,
pub left_right: Pixel,
}Expand description
Borders for styled-border rectangle
Fields§
§corner_top_left: Pixel§corner_top_right: Pixel§corner_bottom_left: Pixel§corner_bottom_right: Pixel§top_bottom: Pixel§left_right: PixelImplementations§
Source§impl BorderStyle
impl BorderStyle
Sourcepub fn new_simple() -> Self
pub fn new_simple() -> Self
Simple border (uses only ascii characters +, -, |)
Sourcepub fn new_double() -> Self
pub fn new_double() -> Self
Double border (uses Box Drawings Double set from unicode)
Sourcepub fn new(
corner_top_left: Pixel,
corner_top_right: Pixel,
corner_bottom_left: Pixel,
corner_bottom_right: Pixel,
top_bottom: Pixel,
left_right: Pixel,
) -> Self
pub fn new( corner_top_left: Pixel, corner_top_right: Pixel, corner_bottom_left: Pixel, corner_bottom_right: Pixel, top_bottom: Pixel, left_right: Pixel, ) -> Self
Creates user-defined border style with specified Pixel’s structs
Sourcepub fn with_colors(self, fg: Color, bg: Color) -> Self
pub fn with_colors(self, fg: Color, bg: Color) -> Self
Changes the border’s colors
Trait Implementations§
Source§impl Clone for BorderStyle
impl Clone for BorderStyle
Source§fn clone(&self) -> BorderStyle
fn clone(&self) -> BorderStyle
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 moreimpl Copy for BorderStyle
Auto Trait Implementations§
impl Freeze for BorderStyle
impl RefUnwindSafe for BorderStyle
impl Send for BorderStyle
impl Sync for BorderStyle
impl Unpin for BorderStyle
impl UnwindSafe for BorderStyle
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