fp_tui 0.2.2

A very basic tui library
Documentation
/// #### Description
/// A struct containing the characters that describe a border
/// 
#[derive(Debug, Clone, Copy)]
pub struct BorderStyle {
    /// #### Description
    /// The character that goes on the top and bottom border
    /// 
    horizontal: char,

    /// #### Description
    /// The character that goes on the left and right border
    /// 
    vertical: char,

    /// #### Description
    /// The character that goes in the top left corner
    /// 
    top_left: char,

    /// #### Description
    /// The character that goes in the top right corner
    /// 
    top_right: char,

    /// #### Description
    /// The character that goes in the bottom left corner
    /// 
    bottom_left: char,

    /// #### Description
    /// The character that goes in the bottom right corner
    /// 
    bottom_right: char,
}

impl BorderStyle {
    /// #### Description
    /// Creates a new border style
    /// 
    /// #### Arguments
    /// * `horizontal`: [char] - the top and bottom border
    /// * `vertical`: [char] - the left and right border
    /// * `top_left`: [char] - the top left border
    /// * `top_right`: [char] - the top right border
    /// * `horizontal`: [char] - the bottom left border
    /// * `horizontal`: [char] - the bottom right border
    /// 
    /// #### Returns
    /// [BorderStyle] - A border style with the given characters
    /// 
    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
        };
    }

    /// #### Description
    /// Retrieves the horizontal border character
    /// 
    /// #### Returns
    /// [char] - The horizontal border character
    /// 
    pub fn get_horizontal(&self) -> char {
        return self.horizontal;
    }

    /// #### Description
    /// Retrieves the vertical border character
    /// 
    /// #### Returns
    /// [char] - The vertical border character
    /// 
    pub fn get_vertical(&self) -> char {
        return self.vertical;
    }

    /// #### Description
    /// Retrieves the top left border character
    /// 
    /// #### Returns
    /// [char] - The top left border character
    /// 
    pub fn get_top_left(&self) -> char {
        return self.top_left;
    }

    /// #### Description
    /// Retrieves the top right border character
    /// 
    /// #### Returns
    /// [char] - The top right border character
    /// 
    pub fn get_top_right(&self) -> char {
        return self.top_right;
    }

    /// #### Description
    /// Retrieves the bottom left border character
    /// 
    /// #### Returns
    /// [char] - The bottom left border character
    /// 
    pub fn get_bottom_left(&self) -> char {
        return self.bottom_left;
    }

    /// #### Description
    /// Retrieves the bottom right border character
    /// 
    /// #### Returns
    /// [char] - The bottom right border character
    /// 
    pub fn get_bottom_right(&self) -> char {
        return self.bottom_right;
    }
}

impl Default for BorderStyle {
    /// #### Description
    /// Creates a border style with the following characters
    /// ─ │ ┌ ┐ └ ┘
    ///
    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}'
        }
    }
}