Skip to main content

Processor

Trait Processor 

Source
pub trait Processor: Send + Sync {
    // Required method
    fn process(&self, resolution: &mut Resolution, input: &ProcessorInput<'_>);
}
Expand description

Convert resolved source content into a value.

Write the result to resolution.val. A failure goes in resolution.err, which fails the whole parse: TypeScript lets a nested parse error escape rather than substituting the raw text, and so does this.

Implementations must be Send + Sync, for the reason crate::Resolver gives.

Required Methods§

Source

fn process(&self, resolution: &mut Resolution, input: &ProcessorInput<'_>)

Process resolution in place.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> Processor for F
where F: Fn(&mut Resolution, &ProcessorInput<'_>) + Send + Sync,