[][src]Trait cargo_create::providers::VariableProvider

pub trait VariableProvider {
    fn populate(&self, ctx: &mut Context) -> bool;
fn priority(&self) -> u8; }

Provides variables that can be inserted into templates.

Required methods

fn populate(&self, ctx: &mut Context) -> bool

Populates the context with the variables.

Implementations should check if the value is already been inserted if they are part of set of variable providers (like author_name).

fn priority(&self) -> u8

Returns the priority that the provider has.

The lower the priority is, the earlier the provider will be called.

Loading content...

Trait Implementations

impl Collect for &'static dyn VariableProvider[src]

Implementors

Loading content...