use crate::error::ChartResult;
use embedded_graphics::pixelcolor::PixelColor;
pub struct CustomChart<C: PixelColor> {
_phantom: core::marker::PhantomData<C>,
}
impl<C: PixelColor> CustomChart<C> {
pub fn builder() -> CustomChartBuilder<C> {
CustomChartBuilder::new()
}
}
pub struct CustomChartBuilder<C: PixelColor> {
_phantom: core::marker::PhantomData<C>,
}
impl<C: PixelColor> CustomChartBuilder<C> {
pub fn new() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
pub fn build(self) -> ChartResult<CustomChart<C>> {
Ok(CustomChart {
_phantom: core::marker::PhantomData,
})
}
}
impl<C: PixelColor> Default for CustomChartBuilder<C> {
fn default() -> Self {
Self::new()
}
}