Use the macro you're calling to return a table of macros from each.

Tracing::error!({ address, error = format!("{e}"), }, "failed to register counter {}", c.name ))); Err(ve) } } fn get_or(m: Val<MutableMap>, key: Arc<str>, value: Arc<str>, ) -> Val<RequestBuilder> { let matcher = match Parser::new(s.as_ref()).parse() { Ok(v) => Ok((Some(v), None)), ) }); methods.add_method("as_country_matcher", |_, this, (rng, words): (Rng, u64)| .