girltest 0.1.0

THIS IS A TEST!
Documentation
//! Girltest
//!
//! `girltest` is a module designed to enable operations involving girls.

/// Holds a girl.
#[derive(Debug)]
pub struct Girl {
    pub gender: String,
    pub sexuality: String,
    pub contains_boy: bool,
    pub name: u32,
    pub foot_name: Option<String>,
}

impl Girl {
    pub fn new_girl(gender: String, sexuality: String, contains_boy: bool, name: u32) -> Self {
        Girl {
            gender,
            sexuality,
            contains_boy,
            name,
            foot_name: None,
        }
    }

    pub fn get_gender(self: &Self) -> &String {
        &self.gender
    }

    pub fn get_sexuality(&self) -> &String {
        &self.sexuality
    }

    pub fn get_contains_boy(&self) -> bool {
        self.contains_boy
    }

    pub fn get_name(&self) -> u32 {
        self.name
    }

    /// Returns the starting initial of the `gender` field of a `Girl`.
    ///
    ///# Panics
    /// Panics if `gender` is an empty `String`.
    ///
    /// # Examples
    ///
    /// ```
    /// let girl = girltest::Girl::new_girl(
    ///     String::from("boy"),
    ///     String::from("gay"),
    ///     true,
    ///     32
    /// );
    ///
    /// assert_eq!("b", girl.gender_initial());
    /// ```
    pub fn gender_initial(&self) -> &str {
        &self.gender[..1]
    }
}