Skip to main content

Matcher

Trait Matcher 

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

    // Required method
    fn try_match<'a>(item: &'a ExtDTypeRef) -> Option<Self::Match<'a>>;

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

A trait for matching extension dtypes.

Required Associated Types§

Source

type Match<'a>

The matched view type.

Required Methods§

Source

fn try_match<'a>(item: &'a ExtDTypeRef) -> Option<Self::Match<'a>>

Try to match the given extension type, returning the matched dtype if successful.

Provided Methods§

Source

fn matches(item: &ExtDTypeRef) -> bool

Check if the given extension dtype matches this matcher.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§