fp_tui 0.2.2

A very basic tui library
Documentation
/// #### Description
/// A location in the 2D plane
///
#[derive(Debug, Clone, Copy)]
 pub struct Position {
    /// #### Description
    /// Position on the x axis
    ///
    x: i32,

    /// #### Description
    /// Position on the y axis
    ///
    y: i32
}

impl Position {
    /// #### Description
    /// Creates a 2D position
    ///
    /// #### Arguments
    /// * `x`: [i32] - The x coordinate
    /// * `y`: [i32] - The y coordinate
    ///
    /// #### Returns
    /// [Position] - The 2D position with the given coordinates
    ///
    pub fn new(x: i32, y: i32) -> Self {
        return Self {x, y};
    }

    /// #### Description
    /// Retrieves the x coordinate of the position
    ///
    /// #### Returns
    /// [u32] - The x coordinate of the position
    ///
    pub fn get_x(&self) -> i32 {
        return self.x;
    }

    /// #### Description
    /// Sets the x coordinate of the position
    ///
    /// #### Arguments
    /// `value`: [u32] - The value to set the x coordinate to
    ///
    pub fn set_x(&mut self, value: i32) {
        self.x = value;
    }

    /// #### Description
    /// Retrieves the y coordinate of the position
    ///
    /// #### Returns
    /// [u32] - The y coordinate of the position
    ///
    pub fn get_y(&self) -> i32 {
        return self.y;
    }

    /// #### Description
    /// Sets the x coordinate of the position
    ///
    /// #### Arguments
    /// `value`: [u32] - The value to set the x coordinate to
    ///
    pub fn set_y(&mut self, value: i32) {
        self.y = value;
    }
}