Skip to main content

Processor

Trait Processor 

Source
pub trait Processor: Send + Sync {
    // Required method
    fn process(&self, value: &str) -> Result<String, String>;
}
Expand description

String transformer used in template processor pipelines.

Processors receive the rendered output of a rule or binding expression and return the transformed value. Returning Err stops rendering and surfaces a crate::render::RenderError::ProcessorError.

Required Methods§

Source

fn process(&self, value: &str) -> Result<String, String>

Transforms one rendered value.

Implementors§

Source§

impl<F> Processor for F
where F: Fn(&str) -> Result<String, String> + Send + Sync,