1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-22 05:35:08 +02:00

expose header::map module (#2470)

This commit is contained in:
Rob Ede
2021-11-29 02:22:47 +00:00
committed by GitHub
parent 654dc64a09
commit fc4cdf81eb
9 changed files with 79 additions and 24 deletions

View File

@@ -1,11 +1,12 @@
//! Helper trait for types that can be effectively borrowed as a [HeaderValue].
//!
//! [HeaderValue]: crate::http::HeaderValue
//! Sealed [`AsHeaderName`] trait and implementations.
use std::{borrow::Cow, str::FromStr};
use std::{borrow::Cow, str::FromStr as _};
use http::header::{HeaderName, InvalidHeaderName};
/// Sealed trait implemented for types that can be effectively borrowed as a [`HeaderValue`].
///
/// [`HeaderValue`]: crate::http::HeaderValue
pub trait AsHeaderName: Sealed {}
pub struct Seal;