Trait code_gen::WithParams

source ·
pub trait WithParams {
    // Required methods
    fn params(&self) -> &[Box<dyn Expression>];
    fn with_param<P>(self, param: P) -> Self
       where P: 'static + Expression;
    fn add_param<P>(&mut self, param: P)
       where P: 'static + Expression;

    // Provided methods
    fn write_params(&self, b: &mut CodeBuffer) { ... }
    fn write_params_with_parens(&self, b: &mut CodeBuffer) { ... }
}
Expand description

An element with expression parameters.

Required Methods§

source

fn params(&self) -> &[Box<dyn Expression>]

Gets the parameters.

source

fn with_param<P>(self, param: P) -> Self
where P: 'static + Expression,

Adds the parameter.

source

fn add_param<P>(&mut self, param: P)
where P: 'static + Expression,

Adds the parameter.

Provided Methods§

source

fn write_params(&self, b: &mut CodeBuffer)

Writes the parameters.

source

fn write_params_with_parens(&self, b: &mut CodeBuffer)

Writes the parameters with parentheses.

Object Safety§

This trait is not object safe.

Implementors§