Matcher

Trait Matcher 

Source
pub trait Matcher:
    Send
    + Sync
    + 'static {
    type View<'a>;

    // Required methods
    fn key(&self) -> MatchKey;
    fn try_match<'a>(&self, array: &'a ArrayRef) -> Option<Self::View<'a>>;
}
Expand description

Trait for matching array types in optimizer rules

Required Associated Types§

Source

type View<'a>

Required Methods§

Source

fn key(&self) -> MatchKey

Return the key for this matcher

Source

fn try_match<'a>(&self, array: &'a ArrayRef) -> Option<Self::View<'a>>

Try to match the given array to this matcher type

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.

Implementors§

Source§

impl Matcher for AnyScalarFn

Source§

impl Matcher for AnyArray

Source§

type View<'a> = &'a Arc<dyn Array>

Source§

impl<F: VTable> Matcher for ExactScalarFn<F>

Source§

impl<V: VTable> Matcher for Exact<V>

Source§

type View<'a> = &'a <V as VTable>::Array