1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

remove BodyEncoding trait (#2565)

This commit is contained in:
Rob Ede
2022-01-03 18:46:04 +00:00
committed by GitHub
parent 19a46e3925
commit 0bc4ae9158
20 changed files with 355 additions and 403 deletions

View File

@ -6,7 +6,7 @@ use ahash::AHashMap;
use http::header::{HeaderName, HeaderValue};
use smallvec::{smallvec, SmallVec};
use crate::header::AsHeaderName;
use super::AsHeaderName;
/// A multi-map of HTTP headers.
///

View File

@ -50,10 +50,10 @@ pub use self::utils::{
/// An interface for types that already represent a valid header.
pub trait Header: TryIntoHeaderValue {
/// Returns the name of the header field
/// Returns the name of the header field.
fn name() -> HeaderName;
/// Parse a header
/// Parse the header from a HTTP message.
fn parse<M: HttpMessage>(msg: &M) -> Result<Self, ParseError>;
}

View File

@ -68,6 +68,7 @@ impl ContentEncoding {
}
impl Default for ContentEncoding {
#[inline]
fn default() -> Self {
Self::Identity
}