Trait pipeline::Processor

source ·
pub trait Processor: Debug + Send + Sync + 'static {
    // Required methods
    fn kind(&self) -> &str;
    fn ignore_missing(&self) -> bool;
    fn exec_mut(&self, val: &mut Vec<Value>) -> Result<()>;
}
Expand description

Processor trait defines the interface for all processors A processor is a transformation that can be applied to a field in a document It can be used to extract, transform, or enrich data Now Processor only have one input field. In the future, we may support multiple input fields. The output of a processor is a map of key-value pairs that will be merged into the document when you use exec_map method.

Required Methods§

source

fn kind(&self) -> &str

Get the processor’s kind

source

fn ignore_missing(&self) -> bool

Whether to ignore missing

source

fn exec_mut(&self, val: &mut Vec<Value>) -> Result<()>

Execute the processor on a vector which be preprocessed by the pipeline

Implementors§