#[non_exhaustive]pub enum HeaderName {
Show 72 variants
Accept,
AcceptContact,
AcceptEncoding,
AcceptLanguage,
AlertInfo,
Allow,
AllowEvents,
AuthenticationInfo,
Authorization,
CallId,
CallInfo,
Contact,
ContentDisposition,
ContentEncoding,
ContentLanguage,
ContentLength,
ContentType,
CSeq,
Date,
ErrorInfo,
Event,
Expires,
FeatureCaps,
From,
Identity,
IdentityInfo,
FlowTimer,
InReplyTo,
HistoryInfo,
MaxForwards,
MimeVersion,
MinExpires,
MinSe,
Organization,
Path,
PAssertedIdentity,
PPreferredIdentity,
Priority,
Privacy,
ProxyAuthenticate,
ProxyAuthorization,
ProxyRequire,
RAck,
Reason,
RecordRoute,
ReferSub,
ReferTo,
ReferredBy,
RejectContact,
Replaces,
ReplyTo,
RequestDisposition,
Require,
RetryAfter,
Route,
RSeq,
Server,
ServiceRoute,
SessionExpires,
SipETag,
SipIfMatch,
Subject,
SubscriptionState,
Supported,
Timestamp,
To,
Unsupported,
UserAgent,
Via,
Warning,
WwwAuthenticate,
Other(Bytes),
}Expand description
A header field name.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Accept
Accept
AcceptContact
Accept-Contact
AcceptEncoding
Accept-Encoding
AcceptLanguage
Accept-Language
AlertInfo
Alert-Info
Allow
Allow
AllowEvents
Allow-Events
AuthenticationInfo
Authentication-Info
Authorization
Authorization
CallId
Call-ID
CallInfo
Call-Info
Contact
Contact
ContentDisposition
Content-Disposition
ContentEncoding
Content-Encoding
ContentLanguage
Content-Language
ContentLength
Content-Length
ContentType
Content-Type
CSeq
CSeq
Date
Date
ErrorInfo
Error-Info
Event
Event
Expires
Expires
FeatureCaps
Feature-Caps
From
From
Identity
Identity
IdentityInfo
Identity-Info
FlowTimer
Flow-Timer
InReplyTo
In-Reply-To
HistoryInfo
History-Info
MaxForwards
Max-Forwards
MimeVersion
MIME-Version
MinExpires
Min-Expires
MinSe
Min-SE
Organization
Organization
Path
Path
PAssertedIdentity
P-Asserted-Identity
PPreferredIdentity
P-Preferred-Identity
Priority
Priority
Privacy
Privacy
ProxyAuthenticate
Proxy-Authenticate
ProxyAuthorization
Proxy-Authorization
ProxyRequire
Proxy-Require
RAck
RAck
Reason
Reason
RecordRoute
Record-Route
ReferSub
Refer-Sub
ReferTo
Refer-To
ReferredBy
Referred-By
RejectContact
Reject-Contact
Replaces
Replaces
ReplyTo
Reply-To
RequestDisposition
Request-Disposition
Require
Require
RetryAfter
Retry-After
Route
Route
RSeq
RSeq
Server
Server
ServiceRoute
Service-Route
SessionExpires
Session-Expires
SipETag
SIP-ETag
SipIfMatch
SIP-If-Match
Subject
Subject
SubscriptionState
Subscription-State
Supported
Supported
Timestamp
Timestamp
To
To
Unsupported
Unsupported
UserAgent
User-Agent
Via
Via
Warning
Warning
WwwAuthenticate
WWW-Authenticate
Other(Bytes)
A header sipx does not model. Compared case-insensitively; its bytes are kept.
Implementations§
Source§impl HeaderName
impl HeaderName
Sourcepub fn canonical(&self) -> &[u8] ⓘ
pub fn canonical(&self) -> &[u8] ⓘ
The canonical spelling, as sipx writes it in messages it constructs.
Sourcepub fn parse(raw: &Bytes) -> Self
pub fn parse(raw: &Bytes) -> Self
Resolve a name as it appeared on the wire.
Never fails: an unrecognized name is HeaderName::Other, because a proxy has
to forward headers it does not know.
Source§impl HeaderName
impl HeaderName
Sourcepub fn is_comma_separated_list(&self) -> bool
pub fn is_comma_separated_list(&self) -> bool
Whether this header’s grammar is a comma-separated list, so that repeated header lines and one line of comma-separated values mean the same thing (RFC 3261 §7.3.1).
The authentication headers are the exception the RFC calls out by name: their values contain commas of their own, so splitting on commas would corrupt them.
Sourcepub fn is_single_value(&self) -> bool
pub fn is_single_value(&self) -> bool
Whether the RFC permits at most one of this header in a message.
RFC 4475 §3.3.8 turns on this: a message with two To headers parses, and must be
rejected by validation rather than by silently using the first.
Trait Implementations§
Source§impl Clone for HeaderName
impl Clone for HeaderName
Source§fn clone(&self) -> HeaderName
fn clone(&self) -> HeaderName
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more