sqruff_lib::templaters

Trait Templater

Source
pub trait Templater: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn process(
        &self,
        in_str: &str,
        f_name: &str,
        config: Option<&FluffConfig>,
        formatter: &Option<Arc<dyn Formatter>>,
    ) -> Result<TemplatedFile, SQLFluffUserError>;
}

Required Methods§

Source

fn name(&self) -> &'static str

The name of the templater.

Source

fn description(&self) -> &'static str

Description of the templater.

Source

fn process( &self, in_str: &str, f_name: &str, config: Option<&FluffConfig>, formatter: &Option<Arc<dyn Formatter>>, ) -> Result<TemplatedFile, SQLFluffUserError>

Process a string and return a TemplatedFile.

Implementors§