use crate::drawing::backend::{BackendCoord, DrawingBackend, DrawingErrorKind};
use std::borrow::Borrow;
mod basic_shapes;
pub use basic_shapes::*;
mod points;
pub use points::*;
mod composable;
pub use composable::{ComposedElement, EmptyElement};
mod candlestick;
pub use candlestick::CandleStick;
pub trait PointCollection<'a, Coord> {
type Borrow: Borrow<Coord>;
type IntoIter: IntoIterator<Item = Self::Borrow>;
fn point_iter(self) -> Self::IntoIter;
}
pub trait Drawable {
fn draw<DB: DrawingBackend, I: Iterator<Item = BackendCoord>>(
&self,
pos: I,
backend: &mut DB,
) -> Result<(), DrawingErrorKind<DB::ErrorType>>;
}