pub fn handler( ctx: Context<'_, '_, '_, '_, AddMiddleware<'_>>, middleware: Middleware, ) -> Result<()>