Trait starlark::values::typing::TypeMatcher
source · pub trait TypeMatcher: Allocative + Debug + Clone + Sized + Send + Sync + 'static {
// Required method
fn matches(&self, value: Value<'_>) -> bool;
// Provided method
fn is_wildcard(&self) -> bool { ... }
}
Expand description
Runtime type matcher. E.g. when isinstance(1, int)
is called,
implementation of TypeMatcher
for int
is used.
Required Methods§
Provided Methods§
sourcefn is_wildcard(&self) -> bool
fn is_wildcard(&self) -> bool
True if this matcher matches any value.
Object Safety§
This trait is not object safe.