1pub mod bin;
2pub mod bin2d;
3pub mod bindot;
4pub mod binhex;
5pub mod boxplot;
6pub mod contour;
7pub mod count;
8pub mod density;
9pub mod density2d;
10pub mod ecdf;
11pub mod function;
12pub mod identity;
13pub mod loess;
14pub mod marching_squares;
15pub mod qq;
16pub mod smooth;
17pub mod sum;
18pub mod summary;
19pub mod summary_bin;
20pub mod ydensity;
21
22use crate::aes::{Aes, Aesthetic};
23use crate::data::DataFrame;
24use crate::scale::ScaleSet;
25
26pub trait Stat: Send + Sync {
28 fn compute_group(&self, data: &DataFrame, scales: &ScaleSet) -> DataFrame;
30
31 fn required_aes(&self) -> Vec<Aesthetic>;
33
34 fn default_aes(&self) -> Aes {
36 Aes::default()
37 }
38
39 fn name(&self) -> &str;
41}