Skip to main content

Matcher

Trait Matcher 

Source
pub trait Matcher {
    type Match<'a>;

    // Required method
    fn try_match<'a>(array: &'a dyn Array) -> Option<Self::Match<'a>>;

    // Provided method
    fn matches(array: &dyn Array) -> bool { ... }
}
Expand description

Trait for matching array types.

Required Associated Types§

Source

type Match<'a>

Required Methods§

Source

fn try_match<'a>(array: &'a dyn Array) -> Option<Self::Match<'a>>

Try to match the given array, returning the matched view type if successful.

Provided Methods§

Source

fn matches(array: &dyn Array) -> bool

Check if the given array matches 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 AnyCanonical

Source§

impl Matcher for AnyColumnar

Source§

impl Matcher for AnyArray

Source§

type Match<'a> = &'a (dyn Array + 'static)

Source§

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

Source§

impl<V: VTable> Matcher for V

Implement a matcher for a specific VTable type

Source§

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