pub enum Header {
Show 47 variants Accept(Accept), AcceptEncoding(AcceptEncoding), AcceptLanguage(AcceptLanguage), AlertInfo(AlertInfo), Allow(Allow), AuthenticationInfo(AuthenticationInfo), Authorization(Authorization), CSeq(CSeq), CallId(CallId), CallInfo(CallInfo), Contact(Contact), ContentDisposition(ContentDisposition), ContentEncoding(ContentEncoding), ContentLanguage(ContentLanguage), ContentLength(ContentLength), ContentType(ContentType), Date(Date), ErrorInfo(ErrorInfo), Event(Event), Expires(Expires), From(From), InReplyTo(InReplyTo), MaxForwards(MaxForwards), MimeVersion(MimeVersion), MinExpires(MinExpires), Organization(Organization), Other(StringString), Priority(Priority), ProxyAuthenticate(ProxyAuthenticate), ProxyAuthorization(ProxyAuthorization), ProxyRequire(ProxyRequire), RecordRoute(RecordRoute), ReplyTo(ReplyTo), Require(Require), RetryAfter(RetryAfter), Route(Route), Server(Server), Subject(Subject), SubscriptionState(SubscriptionState), Supported(Supported), Timestamp(Timestamp), To(To), Unsupported(Unsupported), UserAgent(UserAgent), Via(Via), Warning(Warning), WwwAuthenticate(WwwAuthenticate),
}
Expand description

Big enum holding in each variant every possible header defined in SIP. All variants hold an untyped header which is basically a NewType around String.

In case a header is not defined in Rsip, parsing will store it in the Other variant, which is a tuple of Strings. For instance, constructing the X-Fs-Sending-Message header (related to SMS in SIP), you can do:

let x_fs_sending_message = rsip::Header::Other("X-FS-Sending-Message".into(), "f9c4adc8-9c2a-47d5-a7f1-63d20784685e".into());

Variants

Accept(Accept)

AcceptEncoding(AcceptEncoding)

AcceptLanguage(AcceptLanguage)

AlertInfo(AlertInfo)

Allow(Allow)

AuthenticationInfo(AuthenticationInfo)

Authorization(Authorization)

CSeq(CSeq)

CallId(CallId)

CallInfo(CallInfo)

Contact(Contact)

ContentDisposition(ContentDisposition)

ContentEncoding(ContentEncoding)

ContentLanguage(ContentLanguage)

ContentLength(ContentLength)

ContentType(ContentType)

Date(Date)

ErrorInfo(ErrorInfo)

Event(Event)

Expires(Expires)

From(From)

InReplyTo(InReplyTo)

MaxForwards(MaxForwards)

MimeVersion(MimeVersion)

MinExpires(MinExpires)

Organization(Organization)

Other(StringString)

Priority(Priority)

ProxyAuthenticate(ProxyAuthenticate)

ProxyAuthorization(ProxyAuthorization)

ProxyRequire(ProxyRequire)

RecordRoute(RecordRoute)

ReplyTo(ReplyTo)

Require(Require)

RetryAfter(RetryAfter)

Route(Route)

Server(Server)

Subject(Subject)

SubscriptionState(SubscriptionState)

Supported(Supported)

Timestamp(Timestamp)

To(To)

Unsupported(Unsupported)

UserAgent(UserAgent)

Via(Via)

Warning(Warning)

WwwAuthenticate(WwwAuthenticate)

Trait Implementations

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

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

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.

Should always be Self

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.