#[derive(Debug, Clone, Copy)]
pub struct BorderStyle {
horizontal: char,
vertical: char,
top_left: char,
top_right: char,
bottom_left: char,
bottom_right: char,
}
impl BorderStyle {
pub fn new(
horizontal: char,
vertical: char,
top_left: char,
top_right: char,
bottom_left: char,
bottom_right: char
) -> Self {
return Self {
horizontal,
vertical,
top_left,
top_right,
bottom_left,
bottom_right
};
}
pub fn get_horizontal(&self) -> char {
return self.horizontal;
}
pub fn get_vertical(&self) -> char {
return self.vertical;
}
pub fn get_top_left(&self) -> char {
return self.top_left;
}
pub fn get_top_right(&self) -> char {
return self.top_right;
}
pub fn get_bottom_left(&self) -> char {
return self.bottom_left;
}
pub fn get_bottom_right(&self) -> char {
return self.bottom_right;
}
}
impl Default for BorderStyle {
fn default() -> Self {
return Self {
horizontal: '\u{2500}',
vertical: '\u{2502}',
top_left: '\u{250C}',
top_right: '\u{2510}',
bottom_left: '\u{2514}',
bottom_right: '\u{2518}'
}
}
}