Skip to main content

network_profile_middleware

Function network_profile_middleware 

Source
pub async fn network_profile_middleware(
    __arg0: State<NetworkProfileRuntimeState>,
    req: Request,
    next: Next,
) -> Response
Expand description

Middleware that applies the active profile’s latency before passing to the next layer. Reads NetworkProfileRuntimeState::active() per request — a swap takes effect on the very next call.