WithVarParams

Trait WithVarParams 

Source
pub trait WithVarParams: Sized {
    // Required methods
    fn params(&self) -> &[Var];
    fn add_param<V>(&mut self, param: V)
       where V: Into<Var>;

    // Provided methods
    fn with_param<V>(self, param: V) -> Self
       where V: Into<Var> { ... }
    fn write_params(&self, b: &mut CodeBuffer) { ... }
}
Expand description

An element with variable parameters.

Required Methods§

Source

fn params(&self) -> &[Var]

Gets the parameters.

Source

fn add_param<V>(&mut self, param: V)
where V: Into<Var>,

Adds the parameter.

Provided Methods§

Source

fn with_param<V>(self, param: V) -> Self
where V: Into<Var>,

Adds the parameter.

Source

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

Writes the parameters.

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.

Implementors§