umya-spreadsheet 3.0.0

umya-spreadsheet is a library written in pure Rust to read and write xlsx file.
Documentation
#[derive(Clone, Default, Debug, Eq, Ord, PartialEq, PartialOrd)]
pub struct UInt32Value {
    value: Option<u32>,
}
impl UInt32Value {
    #[inline]
    pub(crate) fn value(&self) -> u32 {
        self.value.unwrap_or(0)
    }

    #[inline]
    #[deprecated(since = "3.0.0", note = "Use value()")]
    pub(crate) fn get_value(&self) -> u32 {
        self.value()
    }

    #[inline]
    pub(crate) fn value_string(&self) -> String {
        self.value().to_string()
    }

    #[inline]
    #[deprecated(since = "3.0.0", note = "Use value_string()")]
    pub(crate) fn get_value_string(&self) -> String {
        self.value_string()
    }

    #[inline]
    pub(crate) fn set_value(&mut self, value: u32) -> &mut Self {
        self.value = Some(value);
        self
    }

    #[inline]
    pub(crate) fn set_value_string<S: Into<String>>(&mut self, value: S) -> &mut Self {
        let s = value.into();
        self.set_value(s.parse::<u32>().unwrap_or_else(|_| {
            s.parse::<u64>()
                .ok()
                .and_then(|v| u32::try_from(v).ok())
                .unwrap_or(u32::MAX)
        }))
    }

    #[inline]
    pub(crate) fn remove_value(&mut self) -> &mut Self {
        self.value = None;
        self
    }

    #[inline]
    pub(crate) fn has_value(&self) -> bool {
        self.value.is_some()
    }

    #[inline]
    pub(crate) fn hash_string(&self) -> String {
        if self.has_value() {
            return self.value_string();
        }
        String::from("empty!!")
    }

    #[inline]
    #[deprecated(since = "3.0.0", note = "Use hash_string()")]
    pub(crate) fn get_hash_string(&self) -> String {
        self.hash_string()
    }
}