sciforge 0.0.3

A comprehensive scientific computing library in pure Rust with zero dependencies
Documentation
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CsvValue<'a> {
    Table,
    Record,
    Field(&'a str),
}

impl<'a> CsvValue<'a> {
    pub const fn is_table(&self) -> bool {
        matches!(self, CsvValue::Table)
    }

    pub const fn is_record(&self) -> bool {
        matches!(self, CsvValue::Record)
    }

    pub const fn as_field(&self) -> Option<&str> {
        match self {
            CsvValue::Field(v) => Some(v),
            _ => None,
        }
    }
}