pub trait Matcher:
Send
+ Sync
+ 'static {
type View<'a>;
// Required method
fn try_match(parent: &Expression) -> Option<Self::View<'_>>;
}Expand description
Trait that abstracts over matching on expression types.
Required Associated Types§
Required Methods§
Sourcefn try_match(parent: &Expression) -> Option<Self::View<'_>>
fn try_match(parent: &Expression) -> Option<Self::View<'_>>
Try to match/downcast the parent expression. Returns Some if the parent matches this matcher’s criteria, None otherwise.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.