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§
Required Methods§
Sourcefn try_match<'a>(item: &'a ExtDTypeRef) -> Option<Self::Match<'a>>
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§
Sourcefn matches(item: &ExtDTypeRef) -> bool
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", so this trait is not object safe.