Processor

Trait Processor 

Source
pub trait Processor {
    // Required methods
    fn name(&self) -> &str;
    fn filter(&self, path: &Path) -> Result<bool>;
    fn process(&self, path: &Path) -> Result<ProcessResult>;

    // Provided method
    fn initialize(&mut self) -> Result<()> { ... }
}

Required Methods§

Source

fn name(&self) -> &str

Source

fn filter(&self, path: &Path) -> Result<bool>

Return true if the given path looks like it should be processed.

Source

fn process(&self, path: &Path) -> Result<ProcessResult>

Process file and indicate whether modifications were made.

Provided Methods§

Source

fn initialize(&mut self) -> Result<()>

Optionally, do “global” setup of the processor.

Implementors§