pub type TypeResolveFn<'a> = &'a dyn Fn(Option<&str>, &str) -> Option<String>;Expand description
Type alias for the resolver closure pattern_matches expects.
Resolver that turns a source-level type reference — optional
namespace plus bare name (m.Color vs plain Color) — into
the declaring module’s path. Pattern matching threads this
through so a pattern like Color::Red only matches values
whose module identity agrees with the current scope’s binding
of Color.
Returning None means “no type with this name is visible in
the calling scope” — the matcher treats that as a mismatch
rather than a fallback, to avoid silently matching a
same-named type from a different module.