pavex

Macro f

source
macro_rules! f {
    ($p:expr) => { ... };
}
Expand description

Convert an unambiguous callable path into RawIdentifiers.

f! is a short-hand for “function-like”. It’s the macro used to specify a function or a method to be used as a constructor, request handler, etc.
Use t!, instead, to specify a type when invoking Blueprint::prebuilt.

§Guide

In the “Cookbook” section of Pavex’s guide on dependency injection you can find a collection of reference examples on how to use f! macro to register different kinds of callables (functions, methods, trait methods, etc.) with a Blueprint.