qubit_http/response/response_interceptor.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026.
4 * Haixing Hu, Qubit Co. Ltd.
5 *
6 * All rights reserved.
7 *
8 ******************************************************************************/
9//! Response interceptor abstraction for successful HTTP responses.
10
11use qubit_function::ArcMutatingFunction;
12
13use super::HttpResponseMeta;
14use crate::HttpResult;
15
16/// Response interceptor function used to inspect/mutate response metadata
17/// (`status`, `headers`, `url`) before the response is returned to callers.
18///
19/// Returning `Err` short-circuits execution for the current attempt.
20pub type ResponseInterceptor = ArcMutatingFunction<HttpResponseMeta, HttpResult<()>>;