Trait ChartExt

Source
pub trait ChartExt:
    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;

    // 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>) -> 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

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>) -> Self

Source

fn into_chart(self) -> Chart

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§