#[non_exhaustive]
#[repr(u8)]
pub enum KnownHeaderName {
Show 141 variants Accept = 0, AcceptCh = 1, AcceptChLifetime = 2, AcceptCharset = 3, AcceptEncoding = 4, AcceptLanguage = 5, AcceptPushPolicy = 6, AcceptRanges = 7, AcceptSignature = 8, AccessControlAllowCredentials = 9, AccessControlAllowHeaders = 10, AccessControlAllowMethods = 11, AccessControlAllowOrigin = 12, AccessControlExposeHeaders = 13, AccessControlMaxAge = 14, AccessControlRequestHeaders = 15, AccessControlRequestMethod = 16, Age = 17, Allow = 18, AltSvc = 19, Authorization = 20, CacheControl = 21, ClearSiteData = 22, Connection = 23, ContentDpr = 24, ContentDisposition = 25, ContentEncoding = 26, ContentLanguage = 27, ContentLength = 28, ContentLocation = 29, ContentRange = 30, ContentSecurityPolicy = 31, ContentSecurityPolicyReportOnly = 32, ContentType = 33, Cookie = 34, Cookie2 = 35, CrossOriginEmbedderPolicy = 36, CrossOriginOpenerPolicy = 37, CrossOriginResourcePolicy = 38, Dnt = 39, Dpr = 40, Date = 41, DeviceMemory = 42, Downlink = 43, Ect = 44, Etag = 45, EarlyData = 46, Expect = 47, ExpectCt = 48, Expires = 49, FeaturePolicy = 50, Forwarded = 51, From = 52, Host = 53, IfMatch = 54, IfModifiedSince = 55, IfNoneMatch = 56, IfRange = 57, IfUnmodifiedSince = 58, KeepAlive = 59, LargeAllocation = 60, LastEventId = 61, LastModified = 62, Link = 63, Location = 64, MaxForwards = 65, Nel = 66, Origin = 67, OriginIsolation = 68, PingFrom = 69, PingTo = 70, Pragma = 71, ProxyAuthenticate = 72, ProxyAuthorization = 73, ProxyConnection = 74, PublicKeyPins = 75, PublicKeyPinsReportOnly = 76, PushPolicy = 77, Rtt = 78, Range = 79, Referer = 80, ReferrerPolicy = 81, RefreshCache = 82, ReportTo = 83, RetryAfter = 84, SaveData = 85, SecChUa = 86, SecChUAMobile = 87, SecChUAPlatform = 88, SecFetchDest = 89, SecFetchMode = 90, SecFetchSite = 91, SecFetchUser = 92, SecGpc = 93, SecWebsocketAccept = 94, SecWebsocketExtensions = 95, SecWebsocketKey = 96, SecWebsocketProtocol = 97, SecWebsocketVersion = 98, Server = 99, ServerTiming = 100, ServiceWorkerAllowed = 101, SetCookie = 102, SetCookie2 = 103, Signature = 104, SignedHeaders = 105, Sourcemap = 106, StrictTransportSecurity = 107, Te = 108, TimingAllowOrigin = 109, Trailer = 110, TransferEncoding = 111, Upgrade = 112, UpgradeInsecureRequests = 113, UserAgent = 114, Vary = 115, Via = 116, ViewportWidth = 117, WwwAuthenticate = 118, Warning = 119, Width = 120, Xcache = 121, XcontentTypeOptions = 122, XdnsPrefetchControl = 123, XdownloadOptions = 124, XfirefoxSpdy = 125, XforwardedBy = 126, XforwardedFor = 127, XforwardedHost = 128, XforwardedProto = 129, XforwardedSsl = 130, XframeOptions = 131, XpermittedCrossDomainPolicies = 132, Xpingback = 133, XpoweredBy = 134, XrequestId = 135, XrequestedWith = 136, XrobotsTag = 137, XservedBy = 138, XuaCompatible = 139, XxssProtection = 140,
}
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 = 0

The Accept header.

§

AcceptCh = 1

The Accept-CH header.

§

AcceptChLifetime = 2

The Accept-CH-Lifetime header.

§

AcceptCharset = 3

The Accept-Charset header.

§

AcceptEncoding = 4

The Accept-Encoding header.

§

AcceptLanguage = 5

The Accept-Language header.

§

AcceptPushPolicy = 6

The Accept-Push-Policy header.

§

AcceptRanges = 7

The Accept-Ranges header.

§

AcceptSignature = 8

The Accept-Signature header.

§

AccessControlAllowCredentials = 9

§

AccessControlAllowHeaders = 10

§

AccessControlAllowMethods = 11

§

AccessControlAllowOrigin = 12

§

AccessControlExposeHeaders = 13

§

AccessControlMaxAge = 14

§

AccessControlRequestHeaders = 15

§

AccessControlRequestMethod = 16

§

Age = 17

The Age header.

§

Allow = 18

The Allow header.

§

AltSvc = 19

The Alt-Svc header.

§

Authorization = 20

The Authorization header.

§

CacheControl = 21

The Cache-Control header.

§

ClearSiteData = 22

The Clear-Site-Data header.

§

Connection = 23

The Connection header.

§

ContentDpr = 24

The Content-DPR header.

§

ContentDisposition = 25

The Content-Disposition header.

§

ContentEncoding = 26

The Content-Encoding header.

§

ContentLanguage = 27

The Content-Language header.

§

ContentLength = 28

The Content-Length header.

§

ContentLocation = 29

The Content-Location header.

§

ContentRange = 30

The Content-Range header.

§

ContentSecurityPolicy = 31

§

ContentSecurityPolicyReportOnly = 32

§

ContentType = 33

The Content-Type header.

§

Cookie = 34

The Cookie header.

§

Cookie2 = 35

The Cookie2 header.

§

CrossOriginEmbedderPolicy = 36

§

CrossOriginOpenerPolicy = 37

§

CrossOriginResourcePolicy = 38

§

Dnt = 39

The DNT header.

§

Dpr = 40

The DPR header.

§

Date = 41

The Date header.

§

DeviceMemory = 42

The Device-Memory header.

The Downlink header.

§

Ect = 44

The ECT header.

§

Etag = 45

The ETag header.

§

EarlyData = 46

The Early-Data header.

§

Expect = 47

The Expect header.

§

ExpectCt = 48

The Expect-CT header.

§

Expires = 49

The Expires header.

§

FeaturePolicy = 50

The Feature-Policy header.

§

Forwarded = 51

The Forwarded header.

§

From = 52

The From header.

§

Host = 53

The Host header.

§

IfMatch = 54

The If-Match header.

§

IfModifiedSince = 55

The If-Modified-Since header.

§

IfNoneMatch = 56

The If-None-Match header.

§

IfRange = 57

The If-Range header.

§

IfUnmodifiedSince = 58

The If-Unmodified-Since header.

§

KeepAlive = 59

The Keep-Alive header.

§

LargeAllocation = 60

The Large-Allocation header.

§

LastEventId = 61

The Last-Event-ID header.

§

LastModified = 62

The Last-Modified header.

The Link header.

§

Location = 64

The Location header.

§

MaxForwards = 65

The Max-Forwards header.

§

Nel = 66

The NEL header.

§

Origin = 67

The Origin header.

§

OriginIsolation = 68

The Origin-Isolation header.

§

PingFrom = 69

The Ping-From header.

§

PingTo = 70

The Ping-To header.

§

Pragma = 71

The Pragma header.

§

ProxyAuthenticate = 72

The Proxy-Authenticate header.

§

ProxyAuthorization = 73

The Proxy-Authorization header.

§

ProxyConnection = 74

The Proxy-Connection header.

§

PublicKeyPins = 75

The Public-Key-Pins header.

§

PublicKeyPinsReportOnly = 76

§

PushPolicy = 77

The Push-Policy header.

§

Rtt = 78

The RTT header.

§

Range = 79

The Range header.

§

Referer = 80

The Referer header.

§

ReferrerPolicy = 81

The Referrer-Policy header.

§

RefreshCache = 82

The Refresh-Cache header.

§

ReportTo = 83

The Report-To header.

§

RetryAfter = 84

The Retry-After header.

§

SaveData = 85

The Save-Data header.

§

SecChUa = 86

The Sec-CH-UA header.

§

SecChUAMobile = 87

The Sec-CH-UA-Mobile header.

§

SecChUAPlatform = 88

The Sec-CH-UA-Platform header.

§

SecFetchDest = 89

The Sec-Fetch-Dest header.

§

SecFetchMode = 90

The Sec-Fetch-Mode header.

§

SecFetchSite = 91

The Sec-Fetch-Site header.

§

SecFetchUser = 92

The Sec-Fetch-User header.

§

SecGpc = 93

The Sec-GPC header.

§

SecWebsocketAccept = 94

§

SecWebsocketExtensions = 95

§

SecWebsocketKey = 96

The Sec-WebSocket-Key header.

§

SecWebsocketProtocol = 97

§

SecWebsocketVersion = 98

§

Server = 99

The Server header.

§

ServerTiming = 100

The Server-Timing header.

§

ServiceWorkerAllowed = 101

§

SetCookie = 102

The Set-Cookie header.

§

SetCookie2 = 103

The Set-Cookie2 header.

§

Signature = 104

The Signature header.

§

SignedHeaders = 105

The Signed-Headers header.

§

Sourcemap = 106

The SourceMap header.

§

StrictTransportSecurity = 107

§

Te = 108

The TE header.

§

TimingAllowOrigin = 109

The Timing-Allow-Origin header.

§

Trailer = 110

The Trailer header.

§

TransferEncoding = 111

The Transfer-Encoding header.

§

Upgrade = 112

The Upgrade header.

§

UpgradeInsecureRequests = 113

§

UserAgent = 114

The User-Agent header.

§

Vary = 115

The Vary header.

§

Via = 116

The Via header.

§

ViewportWidth = 117

The Viewport-Width header.

§

WwwAuthenticate = 118

The WWW-Authenticate header.

§

Warning = 119

The Warning header.

§

Width = 120

The Width header.

§

Xcache = 121

The X-Cache header.

§

XcontentTypeOptions = 122

§

XdnsPrefetchControl = 123

§

XdownloadOptions = 124

The X-Download-Options header.

§

XfirefoxSpdy = 125

The X-Firefox-Spdy header.

§

XforwardedBy = 126

The X-Forwarded-By header.

§

XforwardedFor = 127

The X-Forwarded-For header.

§

XforwardedHost = 128

The X-Forwarded-Host header.

§

XforwardedProto = 129

The X-Forwarded-Proto header.

§

XforwardedSsl = 130

The X-Forwarded-SSL header.

§

XframeOptions = 131

The X-Frame-Options header.

§

XpermittedCrossDomainPolicies = 132

§

Xpingback = 133

The X-Pingback header.

§

XpoweredBy = 134

The X-Powered-By header.

§

XrequestId = 135

The X-Request-Id header.

§

XrequestedWith = 136

The X-Requested-With header.

§

XrobotsTag = 137

The X-Robots-Tag header.

§

XservedBy = 138

The X-Served-By header.

§

XuaCompatible = 139

The X-UA-Compatible header.

§

XxssProtection = 140

The X-XSS-Protection header.

Trait Implementations§

§

impl AsRef<str> for KnownHeaderName

§

fn as_ref(&self) -> &str

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

impl Clone for KnownHeaderName

§

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
§

impl Debug for KnownHeaderName

§

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

Formats the value using the given formatter. Read more
§

impl Display for KnownHeaderName

§

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

Formats the value using the given formatter. Read more
§

impl From<KnownHeaderName> for HeaderName<'_>

§

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

Converts to this type from the input type.
§

impl FromStr for KnownHeaderName

§

type Err = ()

The associated error which can be returned from parsing.
§

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

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

impl Hash for KnownHeaderName

§

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
§

impl PartialEq<HeaderName<'_>> for KnownHeaderName

§

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.
§

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

§

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.
§

impl PartialEq<KnownHeaderName> for HeaderName<'_>

§

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.
§

impl PartialEq for KnownHeaderName

§

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.
§

impl Copy for KnownHeaderName

§

impl Eq for KnownHeaderName

§

impl StructuralEq for KnownHeaderName

§

impl StructuralPartialEq for KnownHeaderName

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Q
where 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

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

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 T
where 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 T
where 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 T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.