mod color;
mod style;
mod time;
#[doc(inline)]
pub use self::time::TimeConfig;
#[doc(inline)]
pub use color::ColorConfig;
#[doc(inline)]
pub use style::StyleConfig;
#[non_exhaustive]
#[derive(Default, Clone, Debug)]
pub struct Options {
pub style: StyleConfig,
pub color: ColorConfig,
pub time: TimeConfig,
}
impl Options {
pub const fn with_style(mut self, style: StyleConfig) -> Self {
self.style = style;
self
}
pub const fn with_color(mut self, color: ColorConfig) -> Self {
self.color = color;
self
}
pub fn with_time(mut self, time: TimeConfig) -> Self {
self.time = time;
self
}
}
impl From<TimeConfig> for Options {
fn from(conf: TimeConfig) -> Self {
Self::default().with_time(conf)
}
}
impl From<ColorConfig> for Options {
fn from(conf: ColorConfig) -> Self {
Self::default().with_color(conf)
}
}
impl From<StyleConfig> for Options {
fn from(conf: StyleConfig) -> Self {
Self::default().with_style(conf)
}
}