TypePattern

Trait TypePattern 

Source
pub trait TypePattern<T: 'static> {
    // Required method
    fn matches(&self) -> bool;
}
Expand description

A trait for implementing type pattern matching behavior.

This trait is used to define how types should be matched against patterns. Implementors must provide a matches() method that determines if a type matches the pattern.

Required Methods§

Source

fn matches(&self) -> bool

Returns true if the type matches this pattern

Implementors§

Source§

impl<T: 'static, U: 'static> TypePattern<T> for TypeMatcher<U>