pub trait StdLibFn {
// Required methods
fn name(&self) -> String;
fn summary(&self) -> String;
fn description(&self) -> String;
fn tags(&self) -> Vec<String>;
fn args(&self) -> Vec<StdLibFnArg>;
fn return_value(&self) -> StdLibFnArg;
fn unpublished(&self) -> bool;
fn deprecated(&self) -> bool;
fn std_lib_fn(&self) -> StdFn;
// Provided methods
fn to_json(&self) -> Result<StdLibFnData> { ... }
fn fn_signature(&self) -> String { ... }
}
Expand description
This trait defines functions called upon stdlib functions to generate documentation for them.
Required Methods§
sourcefn description(&self) -> String
fn description(&self) -> String
The description of the function.
The tags of the function.
sourcefn args(&self) -> Vec<StdLibFnArg>
fn args(&self) -> Vec<StdLibFnArg>
The args of the function.
sourcefn return_value(&self) -> StdLibFnArg
fn return_value(&self) -> StdLibFnArg
The return value of the function.
sourcefn unpublished(&self) -> bool
fn unpublished(&self) -> bool
If the function is unpublished.
sourcefn deprecated(&self) -> bool
fn deprecated(&self) -> bool
If the function is deprecated.
sourcefn std_lib_fn(&self) -> StdFn
fn std_lib_fn(&self) -> StdFn
The function itself.
Provided Methods§
sourcefn to_json(&self) -> Result<StdLibFnData>
fn to_json(&self) -> Result<StdLibFnData>
Return a JSON struct representing the function.