闭包怎么标记生命周期?

https://github.com/mantou132/mario/blob/master/src/serve.rs#L31

这里用 actix-web 写的 web 服务,然后我想把一个命令行参数带到 route handler 函数中去,这里就会提示需要 static 生命周期,然后我该怎么解决这个问题呢 ?

文章来源:

Author:Rust.cc
link:https://rust.cc/article?id=c381ec23-203c-4e24-a5ea-d205ec201d10