//DEBUG: #![allow(dead_code)] use anyhow::Result; use std::ops::Deref; use parse::split_columns; pub mod stdin; pub mod parse; pub const DEFAULT_SEP_PATTERN: &str = r"[\t]+"; type Column = Vec; #[derive(Clone, Debug)] pub struct Columns(Vec); impl Deref for Columns { type Target = Vec>; fn deref(&self) -> &Vec> { &self.0 } } // build Columns from &str impl TryFrom<&str> for Columns { type Error = anyhow::Error; fn try_from(value: &str) -> Result { split_columns(value, DEFAULT_SEP_PATTERN) } }