#[non_exhaustive]
#[repr(u8)]
pub enum KnownHeaderName {
Show 138 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, 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.

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

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

The associated error which can be returned from parsing.

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

Feeds this value into the given Hasher. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.