use std::{path::PathBuf, time::Duration}; pub use self::error::Error; mod error; pub mod path; #[cfg(feature = "git")] pub mod git; pub type ProjectItem = Box; pub trait Project: Timestamp { fn to_path_buf(&self) -> &PathBuf; } impl Project for T where T: Timestamp, T: AsRef, { fn to_path_buf(&self) -> &PathBuf { self.as_ref() } } pub trait ProjectParser { fn parse_project(&self, path_buf: PathBuf) -> Option; } pub trait Timestamp { fn timestamp(&self) -> &Duration; } impl Timestamp for T where T: AsRef, { fn timestamp(&self) -> &Duration { self.as_ref() } } #[cfg(feature = "preview")] pub trait Preview { type Error; fn preview(&self) -> Result<(), Self::Error>; }