qubit_http/request/header_injector.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026 Haixing Hu.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! Header injector abstraction for outgoing requests.
11
12use http::HeaderMap;
13use qubit_function::ArcMutatingFunction;
14
15use crate::HttpResult;
16
17/// Header injector function used to mutate outgoing request headers.
18///
19/// This alias keeps the HTTP-domain name while directly reusing
20/// [`ArcMutatingFunction`], so callers can construct injectors with
21/// `HttpHeaderInjector::new(...)`.
22pub type HttpHeaderInjector = ArcMutatingFunction<HeaderMap, HttpResult<()>>;