Skip to main content

with_guard

Function with_guard 

Source
pub fn with_guard(
    guard: Guard,
) -> impl Filter<Extract = (Guard,), Error = Infallible> + Clone
Expand description

造一个产出 Guard 的过滤器,供 .and(...) 接进路由链。

每次请求克隆一次 Arc(引用计数递增),不含任何密钥拷贝。