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 params.
Required Methods§
Sourcefn params(&self) -> &[Box<dyn Expression>]
fn params(&self) -> &[Box<dyn Expression>]
Gets the params.
Sourcefn add_boxed_param(&mut self, param: Box<dyn Expression>)
fn add_boxed_param(&mut self, param: Box<dyn Expression>)
Adds the boxed param
.
Provided Methods§
Sourcefn with_boxed_param(self, param: Box<dyn Expression>) -> Self
fn with_boxed_param(self, param: Box<dyn Expression>) -> Self
Adds the boxed param
.
Sourcefn add_param<E>(&mut self, param: E)where
E: 'static + Expression,
fn add_param<E>(&mut self, param: E)where
E: 'static + Expression,
Adds the param
.
Sourcefn with_param<E>(self, param: E) -> Selfwhere
E: 'static + Expression,
fn with_param<E>(self, param: E) -> Selfwhere
E: 'static + Expression,
Adds the param
.
Sourcefn add_literal_param<L>(&mut self, literal: L)
fn add_literal_param<L>(&mut self, literal: L)
Adds the literal
param.
Sourcefn with_literal_param<L>(self, literal: L) -> Self
fn with_literal_param<L>(self, literal: L) -> Self
Adds the literal
param.
Sourcefn write_params(&self, b: &mut CodeBuffer)
fn write_params(&self, b: &mut CodeBuffer)
Writes the params. (comma separated)
Sourcefn write_params_with_parens(&self, b: &mut CodeBuffer)
fn write_params_with_parens(&self, b: &mut CodeBuffer)
Writes the params with parentheses. (comma separated)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.