Trait rust_code_analysis::Callback[][src]

pub trait Callback {
    type Res;
    type Cfg;
    fn call<T: ParserTrait>(cfg: Self::Cfg, parser: &T) -> Self::Res;
}

A trait for callback functions.

Allows to call a private library function, getting as result its output value.

Associated Types

type Res[src]

The output type returned by the callee

type Cfg[src]

The input type used by the caller to pass the arguments to the callee

Loading content...

Required methods

fn call<T: ParserTrait>(cfg: Self::Cfg, parser: &T) -> Self::Res[src]

Calls a function inside the library and returns its value

Loading content...

Implementors

impl Callback for AstCallback[src]

type Res = AstResponse

type Cfg = AstCfg

impl Callback for CommentRm[src]

type Res = Result<()>

type Cfg = CommentRmCfg

impl Callback for Count[src]

type Res = Result<()>

type Cfg = CountCfg

impl Callback for Dump[src]

type Res = Result<()>

type Cfg = DumpCfg

impl Callback for Find[src]

type Res = Result<()>

type Cfg = FindCfg

impl Callback for Function[src]

type Res = Result<()>

type Cfg = FunctionCfg

impl Callback for Metrics[src]

type Res = Result<()>

type Cfg = MetricsCfg

Loading content...