Skip to main content

ChartExt

Trait ChartExt 

Source
pub trait ChartExt: Serialize {
    type DS;

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

    // Provided methods
    fn new(id: impl AsRef<str>) -> Self
       where Self: Default { ... }
    fn data(self, data: impl Into<Self::DS>) -> Self
       where Self: Sized { ... }
    fn options(self, options: impl Into<ChartOptions>) -> Self
       where Self: Sized { ... }
    fn into_json(&self) -> JsValue { ... }
    fn into_chart(&self) -> Chart { ... }
    fn get_chart_from_id(id: &str) -> Option<Self>
       where for<'de> Self: Deserialize<'de> { ... }
}

Required Associated Types§

Required Methods§

Source

fn get_id(&self) -> &str

Source

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

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
where Self: Default,

Source

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

Source

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

Source

fn into_json(&self) -> JsValue

Source

fn into_chart(&self) -> Chart

Source

fn get_chart_from_id(id: &str) -> Option<Self>
where for<'de> Self: Deserialize<'de>,

Implementors§