Trait kcl_lib::docs::StdLibFn

source ·
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§

source

fn name(&self) -> String

The name of the function.

source

fn summary(&self) -> String

The summary of the function.

source

fn description(&self) -> String

The description of the function.

source

fn tags(&self) -> Vec<String>

The tags of the function.

source

fn args(&self) -> Vec<StdLibFnArg>

The args of the function.

source

fn return_value(&self) -> StdLibFnArg

The return value of the function.

source

fn unpublished(&self) -> bool

If the function is unpublished.

source

fn deprecated(&self) -> bool

If the function is deprecated.

source

fn std_lib_fn(&self) -> StdFn

The function itself.

Provided Methods§

source

fn to_json(&self) -> Result<StdLibFnData>

Return a JSON struct representing the function.

source

fn fn_signature(&self) -> String

Implementors§