pub trait CjcLibrary {
// Required methods
fn name(&self) -> &'static str;
fn version(&self) -> &'static str;
fn builtin_names(&self) -> &[&'static str];
fn method_names(&self) -> &[&'static str];
fn value_type_names(&self) -> &[&'static str];
}Expand description
Trait that CJC library crates implement for self-description.
§Example
ⓘ
pub struct VizorLibrary;
impl CjcLibrary for VizorLibrary {
fn name(&self) -> &'static str { "vizor" }
fn version(&self) -> &'static str { "0.1.0" }
fn builtin_names(&self) -> &[&'static str] { &["vizor_plot"] }
fn method_names(&self) -> &[&'static str] { &["geom_point", "to_svg", "save"] }
fn value_type_names(&self) -> &[&'static str] { &["VizorPlot"] }
}Required Methods§
Sourcefn builtin_names(&self) -> &[&'static str]
fn builtin_names(&self) -> &[&'static str]
List of free-function builtin names this library provides.
Sourcefn method_names(&self) -> &[&'static str]
fn method_names(&self) -> &[&'static str]
List of method names this library handles on its types.
Sourcefn value_type_names(&self) -> &[&'static str]
fn value_type_names(&self) -> &[&'static str]
List of Value variant type names this library introduces.