1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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>>;
}