Skip to main content

PatternDialect

Trait PatternDialect 

Source
pub trait PatternDialect: Send + Sync {
    // Required method
    fn compile(&self, pattern: &str) -> Result<Vec<TextOp>>;
}
Expand description

A surface pattern syntax that compiles to the shared text-pattern VM.

Required Methods§

Source

fn compile(&self, pattern: &str) -> Result<Vec<TextOp>>

Compiles pattern into VM operations.

§Errors

Returns an error when the surface pattern is malformed.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§