pub fn method_chain_args<'a>(
expr: &'a Expr<'_>,
methods: &[&str],
) -> Option<Vec<(&'a Expr<'a>, &'a [Expr<'a>])>>
Expand description
Matches an Expr
against a chain of methods, and return the matched Expr
s.
For example, if expr
represents the .baz()
in foo.bar().baz()
,
method_chain_args(expr, &["bar", "baz"])
will return a Vec
containing the Expr
s for
.bar()
and .baz()