chart_js_rs

Trait ChartExt

source
pub trait ChartExt<A: Annotation + DeserializeOwned>:
    DeserializeOwned
    + Serialize
    + Default {
    type DS;

    // Required methods
    fn get_id(self) -> String;
    fn id(self, id: String) -> Self;
    fn get_data(&mut self) -> &mut Self::DS;
    fn get_options(&mut self) -> &mut ChartOptions<A>;

    // Provided methods
    fn new(id: impl AsRef<str>) -> Self { ... }
    fn data(self, data: impl Into<Self::DS>) -> Self { ... }
    fn options(self, options: impl Into<ChartOptions<A>>) -> Self { ... }
    fn into_chart(self) -> Chart { ... }
    fn get_chart_from_id(id: &str) -> Option<Self> { ... }
}

Required Associated Types§

Required Methods§

source

fn get_id(self) -> String

source

fn id(self, id: String) -> Self

source

fn get_data(&mut self) -> &mut Self::DS

source

fn get_options(&mut self) -> &mut ChartOptions<A>

Provided Methods§

source

fn new(id: impl AsRef<str>) -> Self

source

fn data(self, data: impl Into<Self::DS>) -> Self

source

fn options(self, options: impl Into<ChartOptions<A>>) -> Self

source

fn into_chart(self) -> Chart

source

fn get_chart_from_id(id: &str) -> Option<Self>

Object Safety§

This trait is not object safe.

Implementors§