#[non_exhaustive]#[repr(u8)]pub enum KnownHeaderName {
Show 166 variants
Host = 0,
Date = 1,
Accept = 2,
AcceptCh = 3,
AcceptChLifetime = 4,
AcceptCharset = 5,
AcceptEncoding = 6,
AcceptLanguage = 7,
AcceptPushPolicy = 8,
AcceptRanges = 9,
AcceptSignature = 10,
AccessControlAllowCredentials = 11,
AccessControlAllowHeaders = 12,
AccessControlAllowMethods = 13,
AccessControlAllowOrigin = 14,
AccessControlExposeHeaders = 15,
AccessControlMaxAge = 16,
AccessControlRequestHeaders = 17,
AccessControlRequestMethod = 18,
Age = 19,
Allow = 20,
AltSvc = 21,
AltUsed = 22,
AuthenticationInfo = 23,
Authorization = 24,
CacheControl = 25,
ClearSiteData = 26,
Connection = 27,
ContentDpr = 28,
ContentDigest = 29,
ContentDisposition = 30,
ContentEncoding = 31,
ContentLanguage = 32,
ContentLength = 33,
ContentLocation = 34,
ContentRange = 35,
ContentSecurityPolicy = 36,
ContentSecurityPolicyReportOnly = 37,
ContentType = 38,
Cookie = 39,
Cookie2 = 40,
CrossOriginEmbedderPolicy = 41,
CrossOriginOpenerPolicy = 42,
CrossOriginResourcePolicy = 43,
Dnt = 44,
Dpr = 45,
Dpop = 46,
Deprecation = 47,
DeviceMemory = 48,
Digest = 49,
Downlink = 50,
Ect = 51,
Etag = 52,
EarlyData = 53,
Expect = 54,
ExpectCt = 55,
Expires = 56,
FeaturePolicy = 57,
Forwarded = 58,
From = 59,
IfMatch = 60,
IfModifiedSince = 61,
IfNoneMatch = 62,
IfRange = 63,
IfUnmodifiedSince = 64,
KeepAlive = 65,
LargeAllocation = 66,
LastEventId = 67,
LastModified = 68,
Link = 69,
Location = 70,
MaxForwards = 71,
Nel = 72,
Origin = 73,
OriginIsolation = 74,
PermissionsPolicy = 75,
PingFrom = 76,
PingTo = 77,
Pragma = 78,
Priority = 79,
ProxyAuthenticate = 80,
ProxyAuthenticationInfo = 81,
ProxyAuthorization = 82,
ProxyConnection = 83,
ProxyStatus = 84,
PublicKeyPins = 85,
PublicKeyPinsReportOnly = 86,
Purpose = 87,
PushPolicy = 88,
Rtt = 89,
Range = 90,
RatelimitReset = 91,
RatelimitLimit = 92,
RatelimitRemaining = 93,
Referer = 94,
ReferrerPolicy = 95,
Refresh = 96,
RefreshCache = 97,
ReportTo = 98,
ReprDigest = 99,
RetryAfter = 100,
SaveData = 101,
SecChUa = 102,
SecChUAMobile = 103,
SecChUAPlatform = 104,
SecFetchDest = 105,
SecFetchMode = 106,
SecFetchSite = 107,
SecFetchUser = 108,
SecGpc = 109,
SecWebsocketAccept = 110,
SecWebsocketExtensions = 111,
SecWebsocketKey = 112,
SecWebsocketProtocol = 113,
SecWebsocketVersion = 114,
Server = 115,
ServerTiming = 116,
ServiceWorkerAllowed = 117,
SetCookie = 118,
SetCookie2 = 119,
Signature = 120,
SignedHeaders = 121,
Sourcemap = 122,
StrictTransportSecurity = 123,
Te = 124,
TimingAllowOrigin = 125,
Traceparent = 126,
Tracestate = 127,
Trailer = 128,
TransferEncoding = 129,
Upgrade = 130,
UpgradeInsecureRequests = 131,
UserAgent = 132,
Vary = 133,
Via = 134,
ViewportWidth = 135,
WwwAuthenticate = 136,
WantContentDigest = 137,
WantDigest = 138,
WantReprDigest = 139,
Warning = 140,
Width = 141,
Xb3Traceid = 142,
Xcache = 143,
XcontentTypeOptions = 144,
XcorrelationId = 145,
XdnsPrefetchControl = 146,
XdownloadOptions = 147,
XfirefoxSpdy = 148,
XforwardedBy = 149,
XforwardedFor = 150,
XforwardedHost = 151,
XforwardedProto = 152,
XforwardedSsl = 153,
XframeOptions = 154,
XpermittedCrossDomainPolicies = 155,
Xpingback = 156,
XpoweredBy = 157,
XrealIp = 158,
XrequestId = 159,
XrequestedWith = 160,
XrobotsTag = 161,
Xruntime = 162,
XservedBy = 163,
XuaCompatible = 164,
XxssProtection = 165,
}Expand description
A short non-exhaustive enum of headers that trillium represents as an enum.
Use a KnownHeaderName variant instead of a &’static str anywhere possible, as it
allows trillium to skip parsing the header entirely.
Please do not rely on the u8 representation being stable between releases.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Host = 0
The Host header.
Date = 1
The Date header.
Accept = 2
The Accept header.
AcceptCh = 3
The Accept-CH header.
AcceptChLifetime = 4
The Accept-CH-Lifetime header.
AcceptCharset = 5
The Accept-Charset header.
AcceptEncoding = 6
The Accept-Encoding header.
AcceptLanguage = 7
The Accept-Language header.
AcceptPushPolicy = 8
The Accept-Push-Policy header.
AcceptRanges = 9
The Accept-Ranges header.
AcceptSignature = 10
The Accept-Signature header.
AccessControlAllowCredentials = 11
The Access-Control-Allow-Credentials header.
AccessControlAllowHeaders = 12
The Access-Control-Allow-Headers header.
AccessControlAllowMethods = 13
The Access-Control-Allow-Methods header.
AccessControlAllowOrigin = 14
The Access-Control-Allow-Origin header.
AccessControlExposeHeaders = 15
The Access-Control-Expose-Headers header.
AccessControlMaxAge = 16
The Access-Control-Max-Age header.
AccessControlRequestHeaders = 17
The Access-Control-Request-Headers header.
AccessControlRequestMethod = 18
The Access-Control-Request-Method header.
Age = 19
The Age header.
Allow = 20
The Allow header.
AltSvc = 21
The Alt-Svc header.
AltUsed = 22
The Alt-Used header.
AuthenticationInfo = 23
The Authentication-Info header.
Authorization = 24
The Authorization header.
CacheControl = 25
The Cache-Control header.
ClearSiteData = 26
The Clear-Site-Data header.
Connection = 27
The Connection header.
ContentDpr = 28
The Content-DPR header.
ContentDigest = 29
The Content-Digest header.
ContentDisposition = 30
The Content-Disposition header.
ContentEncoding = 31
The Content-Encoding header.
ContentLanguage = 32
The Content-Language header.
ContentLength = 33
The Content-Length header.
ContentLocation = 34
The Content-Location header.
ContentRange = 35
The Content-Range header.
ContentSecurityPolicy = 36
The Content-Security-Policy header.
ContentSecurityPolicyReportOnly = 37
The Content-Security-Policy-Report-Only header.
ContentType = 38
The Content-Type header.
Cookie = 39
The Cookie header.
Cookie2 = 40
The Cookie2 header.
CrossOriginEmbedderPolicy = 41
The Cross-Origin-Embedder-Policy header.
CrossOriginOpenerPolicy = 42
The Cross-Origin-Opener-Policy header.
CrossOriginResourcePolicy = 43
The Cross-Origin-Resource-Policy header.
Dnt = 44
The DNT header.
Dpr = 45
The DPR header.
Dpop = 46
The DPoP header.
Deprecation = 47
The Deprecation header.
DeviceMemory = 48
The Device-Memory header.
Digest = 49
The Digest header.
Downlink = 50
The Downlink header.
Ect = 51
The ECT header.
Etag = 52
The ETag header.
EarlyData = 53
The Early-Data header.
Expect = 54
The Expect header.
ExpectCt = 55
The Expect-CT header.
Expires = 56
The Expires header.
FeaturePolicy = 57
The Feature-Policy header.
Forwarded = 58
The Forwarded header.
From = 59
The From header.
IfMatch = 60
The If-Match header.
IfModifiedSince = 61
The If-Modified-Since header.
IfNoneMatch = 62
The If-None-Match header.
IfRange = 63
The If-Range header.
IfUnmodifiedSince = 64
The If-Unmodified-Since header.
KeepAlive = 65
The Keep-Alive header.
LargeAllocation = 66
The Large-Allocation header.
LastEventId = 67
The Last-Event-ID header.
LastModified = 68
The Last-Modified header.
Link = 69
The Link header.
Location = 70
The Location header.
MaxForwards = 71
The Max-Forwards header.
Nel = 72
The NEL header.
Origin = 73
The Origin header.
OriginIsolation = 74
The Origin-Isolation header.
PermissionsPolicy = 75
The Permissions-Policy header.
PingFrom = 76
The Ping-From header.
PingTo = 77
The Ping-To header.
Pragma = 78
The Pragma header.
Priority = 79
The Priority header.
ProxyAuthenticate = 80
The Proxy-Authenticate header.
ProxyAuthenticationInfo = 81
The Proxy-Authentication-Info header.
ProxyAuthorization = 82
The Proxy-Authorization header.
ProxyConnection = 83
The Proxy-Connection header.
ProxyStatus = 84
The Proxy-Status header.
PublicKeyPins = 85
The Public-Key-Pins header.
PublicKeyPinsReportOnly = 86
The Public-Key-Pins-Report-Only header.
Purpose = 87
The Purpose header.
PushPolicy = 88
The Push-Policy header.
Rtt = 89
The RTT header.
Range = 90
The Range header.
RatelimitReset = 91
The RateLimit-Reset header.
RatelimitLimit = 92
The Ratelimit-Limit header.
RatelimitRemaining = 93
The Ratelimit-Remaining header.
Referer = 94
The Referer header.
ReferrerPolicy = 95
The Referrer-Policy header.
Refresh = 96
The Refresh header.
RefreshCache = 97
The Refresh-Cache header.
ReportTo = 98
The Report-To header.
ReprDigest = 99
The Repr-Digest header.
RetryAfter = 100
The Retry-After header.
SaveData = 101
The Save-Data header.
SecChUa = 102
The Sec-CH-UA header.
SecChUAMobile = 103
The Sec-CH-UA-Mobile header.
SecChUAPlatform = 104
The Sec-CH-UA-Platform header.
SecFetchDest = 105
The Sec-Fetch-Dest header.
SecFetchMode = 106
The Sec-Fetch-Mode header.
SecFetchSite = 107
The Sec-Fetch-Site header.
SecFetchUser = 108
The Sec-Fetch-User header.
SecGpc = 109
The Sec-GPC header.
SecWebsocketAccept = 110
The Sec-WebSocket-Accept header.
SecWebsocketExtensions = 111
The Sec-WebSocket-Extensions header.
SecWebsocketKey = 112
The Sec-WebSocket-Key header.
SecWebsocketProtocol = 113
The Sec-WebSocket-Protocol header.
SecWebsocketVersion = 114
The Sec-WebSocket-Version header.
Server = 115
The Server header.
ServerTiming = 116
The Server-Timing header.
ServiceWorkerAllowed = 117
The Service-Worker-Allowed header.
SetCookie = 118
The Set-Cookie header.
SetCookie2 = 119
The Set-Cookie2 header.
Signature = 120
The Signature header.
SignedHeaders = 121
The Signed-Headers header.
Sourcemap = 122
The SourceMap header.
StrictTransportSecurity = 123
The Strict-Transport-Security header.
Te = 124
The TE header.
TimingAllowOrigin = 125
The Timing-Allow-Origin header.
Traceparent = 126
The Traceparent header.
Tracestate = 127
The Tracestate header.
Trailer = 128
The Trailer header.
TransferEncoding = 129
The Transfer-Encoding header.
Upgrade = 130
The Upgrade header.
UpgradeInsecureRequests = 131
The Upgrade-Insecure-Requests header.
UserAgent = 132
The User-Agent header.
Vary = 133
The Vary header.
Via = 134
The Via header.
ViewportWidth = 135
The Viewport-Width header.
WwwAuthenticate = 136
The WWW-Authenticate header.
WantContentDigest = 137
The Want-Content-Digest header.
WantDigest = 138
The Want-Digest header.
WantReprDigest = 139
The Want-Repr-Digest header.
Warning = 140
The Warning header.
Width = 141
The Width header.
Xb3Traceid = 142
The X-B3-Traceid header.
Xcache = 143
The X-Cache header.
XcontentTypeOptions = 144
The X-Content-Type-Options header.
XcorrelationId = 145
The X-Correlation-ID header.
XdnsPrefetchControl = 146
The X-DNS-Prefetch-Control header.
XdownloadOptions = 147
The X-Download-Options header.
XfirefoxSpdy = 148
The X-Firefox-Spdy header.
XforwardedBy = 149
The X-Forwarded-By header.
XforwardedFor = 150
The X-Forwarded-For header.
XforwardedHost = 151
The X-Forwarded-Host header.
XforwardedProto = 152
The X-Forwarded-Proto header.
XforwardedSsl = 153
The X-Forwarded-SSL header.
XframeOptions = 154
The X-Frame-Options header.
XpermittedCrossDomainPolicies = 155
The X-Permitted-Cross-Domain-Policies header.
Xpingback = 156
The X-Pingback header.
XpoweredBy = 157
The X-Powered-By header.
XrealIp = 158
The X-Real-IP header.
XrequestId = 159
The X-Request-Id header.
XrequestedWith = 160
The X-Requested-With header.
XrobotsTag = 161
The X-Robots-Tag header.
Xruntime = 162
The X-Runtime header.
XservedBy = 163
The X-Served-By header.
XuaCompatible = 164
The X-UA-Compatible header.
XxssProtection = 165
The X-XSS-Protection header.
Implementations§
Trait Implementations§
Source§impl AsRef<str> for KnownHeaderName
impl AsRef<str> for KnownHeaderName
Source§impl Clone for KnownHeaderName
impl Clone for KnownHeaderName
Source§fn clone(&self) -> KnownHeaderName
fn clone(&self) -> KnownHeaderName
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KnownHeaderName
impl Debug for KnownHeaderName
Source§impl Display for KnownHeaderName
impl Display for KnownHeaderName
Source§impl From<KnownHeaderName> for HeaderName<'_>
impl From<KnownHeaderName> for HeaderName<'_>
Source§fn from(khn: KnownHeaderName) -> Self
fn from(khn: KnownHeaderName) -> Self
Source§impl FromStr for KnownHeaderName
impl FromStr for KnownHeaderName
Source§impl Hash for KnownHeaderName
impl Hash for KnownHeaderName
Source§impl Ord for KnownHeaderName
impl Ord for KnownHeaderName
Source§fn cmp(&self, other: &KnownHeaderName) -> Ordering
fn cmp(&self, other: &KnownHeaderName) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq<HeaderName<'_>> for KnownHeaderName
impl PartialEq<HeaderName<'_>> for KnownHeaderName
Source§fn eq(&self, other: &HeaderName<'_>) -> bool
fn eq(&self, other: &HeaderName<'_>) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq<KnownHeaderName> for &HeaderName<'_>
impl PartialEq<KnownHeaderName> for &HeaderName<'_>
Source§fn eq(&self, other: &KnownHeaderName) -> bool
fn eq(&self, other: &KnownHeaderName) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq<KnownHeaderName> for HeaderName<'_>
impl PartialEq<KnownHeaderName> for HeaderName<'_>
Source§fn eq(&self, other: &KnownHeaderName) -> bool
fn eq(&self, other: &KnownHeaderName) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq for KnownHeaderName
impl PartialEq for KnownHeaderName
Source§fn eq(&self, other: &KnownHeaderName) -> bool
fn eq(&self, other: &KnownHeaderName) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for KnownHeaderName
impl PartialOrd for KnownHeaderName
impl Copy for KnownHeaderName
impl Eq for KnownHeaderName
impl StructuralPartialEq for KnownHeaderName
Auto Trait Implementations§
impl Freeze for KnownHeaderName
impl RefUnwindSafe for KnownHeaderName
impl Send for KnownHeaderName
impl Sync for KnownHeaderName
impl Unpin for KnownHeaderName
impl UnsafeUnpin for KnownHeaderName
impl UnwindSafe for KnownHeaderName
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.