as far as I'm aware all trait functions would need the self parameter for the contained functions.
The syntax to pass a trait would be dyn Trait instead of impl Trait. As far as I'm aware the impl indicates to the compiler that the actual type is inferred from the inner contents of a function, meaning this is typically used as a function returning parameter.
The working code of your example could like this:
trait Context {
fn echo(&self);
}
struct App {
resolver: fn(&str, dyn Context) -> usize, // accepts two arguments `&str` and an argument of `Context`
}
impl Trait in the argument position is the syntax for generic function; in other words, you want resolver to be of type <T: Context>(&str, T) -> usize. But this is not a type from the Rust's point of view - it is a family of types, since generics are monomorphized.