Skip to main content

resolve_method

Function resolve_method 

Source
pub fn resolve_method(
    receiver: &Type,
    method: &str,
    impls: &ImplTable,
) -> Option<ResolvedMethod>
Expand description

Dispatch a method call on receiver by searching impls.

Search order:

  1. The inherent impl registered for receiver’s type key (if any).
  2. All trait impls whose target type key matches receiver.

Returns the first match found, or None if no impl provides method.