Macro fedimint_core::__api_endpoint
source · macro_rules! __api_endpoint { ( $path:expr, async |$state:ident: &$state_ty:ty, $context:ident, $param:ident: $param_ty:ty| -> $resp_ty:ty $body:block ) => { ... }; }
Expand description
Example
struct State;
let _: ApiEndpoint<State> = api_endpoint! {
"/foobar",
async |state: &State, _dbtx, params: ()| -> i32 {
Ok(0)
}
};