#[non_exhaustive]
pub enum KnownHeaderName {
Show 139 variants Accept, AcceptCh, AcceptChLifetime, AcceptCharset, AcceptEncoding, AcceptLanguage, AcceptPushPolicy, AcceptRanges, AcceptSignature, AccessControlAllowCredentials, AccessControlAllowHeaders, AccessControlAllowMethods, AccessControlAllowOrigin, AccessControlExposeHeaders, AccessControlMaxAge, AccessControlRequestHeaders, AccessControlRequestMethod, Age, Allow, AltSvc, Authorization, CacheControl, ClearSiteData, Connection, ContentDpr, ContentDisposition, ContentEncoding, ContentLanguage, ContentLength, ContentLocation, ContentRange, ContentSecurityPolicy, ContentSecurityPolicyReportOnly, ContentType, Cookie, Cookie2, CrossOriginEmbedderPolicy, CrossOriginOpenerPolicy, CrossOriginResourcePolicy, Dnt, Dpr, Date, DeviceMemory, Downlink, Ect, Etag, EarlyData, Expect, ExpectCt, Expires, FeaturePolicy, Forwarded, From, Host, IfMatch, IfModifiedSince, IfNoneMatch, IfRange, IfUnmodifiedSince, KeepAlive, LargeAllocation, LastEventId, LastModified, Link, Location, MaxForwards, Nel, Origin, OriginIsolation, PingFrom, PingTo, Pragma, ProxyAuthenticate, ProxyAuthorization, ProxyConnection, PublicKeyPins, PublicKeyPinsReportOnly, PushPolicy, Rtt, Range, Referer, ReferrerPolicy, RefreshCache, ReportTo, RetryAfter, SaveData, SecChUa, SecChUAMobile, SecChUAPlatform, SecFetchDest, SecFetchMode, SecFetchSite, SecFetchUser, SecGpc, SecWebsocketAccept, SecWebsocketExtensions, SecWebsocketKey, SecWebsocketProtocol, SecWebsocketVersion, Server, ServerTiming, ServiceWorkerAllowed, SetCookie, SetCookie2, Signature, SignedHeaders, Sourcemap, StrictTransportSecurity, Te, TimingAllowOrigin, Trailer, TransferEncoding, Upgrade, UpgradeInsecureRequests, UserAgent, Vary, Via, ViewportWidth, WwwAuthenticate, Warning, Width, XcontentTypeOptions, XdnsPrefetchControl, XdownloadOptions, XfirefoxSpdy, XforwardedBy, XforwardedFor, XforwardedHost, XforwardedProto, XforwardedSsl, XframeOptions, XpermittedCrossDomainPolicies, Xpingback, XpoweredBy, XrequestId, XrequestedWith, XrobotsTag, XuaCompatible, XxssProtection,
}
Expand description

A short nonehaustive enum of headers that trillium can represent as a u8. Use a KnownHeaderName variant instead of a &’static str anywhere possible, as it allows trillium to skip parsing the header entirely.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Accept

The Accept header.

§

AcceptCh

The Accept-CH header.

§

AcceptChLifetime

The Accept-CH-Lifetime header.

§

AcceptCharset

The Accept-Charset header.

§

AcceptEncoding

The Accept-Encoding header.

§

AcceptLanguage

The Accept-Language header.

§

AcceptPushPolicy

The Accept-Push-Policy header.

§

AcceptRanges

The Accept-Ranges header.

§

AcceptSignature

The Accept-Signature header.

§

AccessControlAllowCredentials

§

AccessControlAllowHeaders

§

AccessControlAllowMethods

§

AccessControlAllowOrigin

§

AccessControlExposeHeaders

§

AccessControlMaxAge

§

AccessControlRequestHeaders

§

AccessControlRequestMethod

§

Age

The Age header.

§

Allow

The Allow header.

§

AltSvc

The Alt-Svc header.

§

Authorization

The Authorization header.

§

CacheControl

The Cache-Control header.

§

ClearSiteData

The Clear-Site-Data header.

§

Connection

The Connection header.

§

ContentDpr

The Content-DPR header.

§

ContentDisposition

The Content-Disposition header.

§

ContentEncoding

The Content-Encoding header.

§

ContentLanguage

The Content-Language header.

§

ContentLength

The Content-Length header.

§

ContentLocation

The Content-Location header.

§

ContentRange

The Content-Range header.

§

ContentSecurityPolicy

§

ContentSecurityPolicyReportOnly

§

ContentType

The Content-Type header.

§

Cookie

The Cookie header.

§

Cookie2

The Cookie2 header.

§

CrossOriginEmbedderPolicy

§

CrossOriginOpenerPolicy

§

CrossOriginResourcePolicy

§

Dnt

The DNT header.

§

Dpr

The DPR header.

§

Date

The Date header.

§

DeviceMemory

The Device-Memory header.

The Downlink header.

§

Ect

The ECT header.

§

Etag

The ETag header.

§

EarlyData

The Early-Data header.

§

Expect

The Expect header.

§

ExpectCt

The Expect-CT header.

§

Expires

The Expires header.

§

FeaturePolicy

The Feature-Policy header.

§

Forwarded

The Forwarded header.

§

From

The From header.

§

Host

The Host header.

§

IfMatch

The If-Match header.

§

IfModifiedSince

The If-Modified-Since header.

§

IfNoneMatch

The If-None-Match header.

§

IfRange

The If-Range header.

§

IfUnmodifiedSince

The If-Unmodified-Since header.

§

KeepAlive

The Keep-Alive header.

§

LargeAllocation

The Large-Allocation header.

§

LastEventId

The Last-Event-ID header.

§

LastModified

The Last-Modified header.

The Link header.

§

Location

The Location header.

§

MaxForwards

The Max-Forwards header.

§

Nel

The NEL header.

§

Origin

The Origin header.

§

OriginIsolation

The Origin-Isolation header.

§

PingFrom

The Ping-From header.

§

PingTo

The Ping-To header.

§

Pragma

The Pragma header.

§

ProxyAuthenticate

The Proxy-Authenticate header.

§

ProxyAuthorization

The Proxy-Authorization header.

§

ProxyConnection

The Proxy-Connection header.

§

PublicKeyPins

The Public-Key-Pins header.

§

PublicKeyPinsReportOnly

§

PushPolicy

The Push-Policy header.

§

Rtt

The RTT header.

§

Range

The Range header.

§

Referer

The Referer header.

§

ReferrerPolicy

The Referrer-Policy header.

§

RefreshCache

The Refresh-Cache header.

§

ReportTo

The Report-To header.

§

RetryAfter

The Retry-After header.

§

SaveData

The Save-Data header.

§

SecChUa

The Sec-CH-UA header.

§

SecChUAMobile

The Sec-CH-UA-Mobile header.

§

SecChUAPlatform

The Sec-CH-UA-Platform header.

§

SecFetchDest

The Sec-Fetch-Dest header.

§

SecFetchMode

The Sec-Fetch-Mode header.

§

SecFetchSite

The Sec-Fetch-Site header.

§

SecFetchUser

The Sec-Fetch-User header.

§

SecGpc

The Sec-GPC header.

§

SecWebsocketAccept

§

SecWebsocketExtensions

§

SecWebsocketKey

The Sec-WebSocket-Key header.

§

SecWebsocketProtocol

§

SecWebsocketVersion

§

Server

The Server header.

§

ServerTiming

The Server-Timing header.

§

ServiceWorkerAllowed

§

SetCookie

The Set-Cookie header.

§

SetCookie2

The Set-Cookie2 header.

§

Signature

The Signature header.

§

SignedHeaders

The Signed-Headers header.

§

Sourcemap

The SourceMap header.

§

StrictTransportSecurity

§

Te

The TE header.

§

TimingAllowOrigin

The Timing-Allow-Origin header.

§

Trailer

The Trailer header.

§

TransferEncoding

The Transfer-Encoding header.

§

Upgrade

The Upgrade header.

§

UpgradeInsecureRequests

§

UserAgent

The User-Agent header.

§

Vary

The Vary header.

§

Via

The Via header.

§

ViewportWidth

The Viewport-Width header.

§

WwwAuthenticate

The WWW-Authenticate header.

§

Warning

The Warning header.

§

Width

The Width header.

§

XcontentTypeOptions

§

XdnsPrefetchControl

§

XdownloadOptions

The X-Download-Options header.

§

XfirefoxSpdy

The X-Firefox-Spdy header.

§

XforwardedBy

The X-Forwarded-By header.

§

XforwardedFor

The X-Forwarded-For header.

§

XforwardedHost

The X-Forwarded-Host header.

§

XforwardedProto

The X-Forwarded-Proto header.

§

XforwardedSsl

The X-Forwarded-SSL header.

§

XframeOptions

The X-Frame-Options header.

§

XpermittedCrossDomainPolicies

§

Xpingback

The X-Pingback header.

§

XpoweredBy

The X-Powered-By header.

§

XrequestId

The X-Request-Id header.

§

XrequestedWith

The X-Requested-With header.

§

XrobotsTag

The X-Robots-Tag header.

§

XuaCompatible

The X-UA-Compatible header.

§

XxssProtection

The X-XSS-Protection header.

Trait Implementations§

source§

impl AsRef<str> for KnownHeaderName

source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for KnownHeaderName

source§

fn clone(&self) -> KnownHeaderName

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for KnownHeaderName

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for KnownHeaderName

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<KnownHeaderName> for HeaderName<'_>

source§

fn from(khn: KnownHeaderName) -> HeaderName<'_>

Converts to this type from the input type.
source§

impl FromStr for KnownHeaderName

§

type Err = ()

The associated error which can be returned from parsing.
source§

fn from_str( s: &str ) -> Result<KnownHeaderName, <KnownHeaderName as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for KnownHeaderName

source§

fn hash<__H>(&self, state: &mut __H)where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<HeaderName<'_>> for KnownHeaderName

source§

fn eq(&self, other: &HeaderName<'_>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<KnownHeaderName> for &HeaderName<'_>

source§

fn eq(&self, other: &KnownHeaderName) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<KnownHeaderName> for HeaderName<'_>

source§

fn eq(&self, other: &KnownHeaderName) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<KnownHeaderName> for KnownHeaderName

source§

fn eq(&self, other: &KnownHeaderName) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for KnownHeaderName

source§

impl Eq for KnownHeaderName

source§

impl StructuralEq for KnownHeaderName

source§

impl StructuralPartialEq for KnownHeaderName

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.