Skip to main content

Matcher

Trait Matcher 

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

    // Required method
    fn try_match(array: &ArrayRef) -> Option<Self::Match<'_>>;

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

Trait for matching array types.

Required Associated Types§

Source

type Match<'a>

Required Methods§

Source

fn try_match(array: &ArrayRef) -> Option<Self::Match<'_>>

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

Provided Methods§

Source

fn matches(array: &ArrayRef) -> 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".

Implementors§