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§
sourcefn params(&self) -> &[Box<dyn Expression>]
fn params(&self) -> &[Box<dyn Expression>]
Gets the parameters.
sourcefn with_param<P>(self, param: P) -> Selfwhere
P: 'static + Expression,
fn with_param<P>(self, param: P) -> Selfwhere
P: 'static + Expression,
Adds the parameter.
sourcefn add_param<P>(&mut self, param: P)where
P: 'static + Expression,
fn add_param<P>(&mut self, param: P)where
P: 'static + Expression,
Adds the parameter.
Provided Methods§
sourcefn write_params(&self, b: &mut CodeBuffer)
fn write_params(&self, b: &mut CodeBuffer)
Writes the parameters.
sourcefn write_params_with_parens(&self, b: &mut CodeBuffer)
fn write_params_with_parens(&self, b: &mut CodeBuffer)
Writes the parameters with parentheses.
Object Safety§
This trait is not object safe.