Trait code_gen::WithParams

source ·
pub trait WithParams: Sized {
    // Required methods
    fn params(&self) -> &[Box<dyn Expression>];
    fn add_boxed_param(&mut self, param: Box<dyn Expression>);

    // Provided methods
    fn with_boxed_param(self, param: Box<dyn Expression>) -> Self { ... }
    fn add_param<E>(&mut self, param: E)
       where E: 'static + Expression { ... }
    fn with_param<E>(self, param: E) -> Self
       where E: 'static + Expression { ... }
    fn add_literal_param<L>(&mut self, literal: L)
       where L: Into<Literal> { ... }
    fn with_literal_param<L>(self, literal: L) -> Self
       where L: Into<Literal> { ... }
    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 add_boxed_param(&mut self, param: Box<dyn Expression>)

Adds the boxed parameter.

Provided Methods§

source

fn with_boxed_param(self, param: Box<dyn Expression>) -> Self

Adds the boxed parameter.

source

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

Adds the parameter.

source

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

Adds the parameter.

source

fn add_literal_param<L>(&mut self, literal: L)
where L: Into<Literal>,

Adds the literal parameter.

source

fn with_literal_param<L>(self, literal: L) -> Self
where L: Into<Literal>,

Adds the literal parameter.

source

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

Writes the parameters. (comma separated)

source

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

Writes the parameters with parentheses. (comma separated)

Object Safety§

This trait is not object safe.

Implementors§