actix的中间件wrap_fn是不是没法单独写函数?
📝
内容提要
就是actix中间件的简化写法wrap_fn,下面是官方范例。 use actix_web::{dev::Service as _, middleware, web, App}; use actix_web::http::header::{CONTENT_TYPE, HeaderValue}; async fn index() -> &'static str { ...
➡️