gust 0.1.4

A small charting library for generating d3 and html charts using Rust
1
2
3
4
5
6
7
8
9
10
11
12
13


use serde::ser::Serialize;
use serde_json;

pub trait Graphable: Sized + Serialize {
    fn get_json_representation(&self) -> String {
        serde_json::to_string(self).unwrap()
    }

    fn get_description(&self) -> &str;
    fn get_identifier(&self) -> &str;
}