Header

Enum Header 

Source
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(String, String), 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 = ftth_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(String, String)

§

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§

Source§

impl Clone for Header

Source§

fn clone(&self) -> Header

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Header

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for Header

Source§

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

Formats the value using the given formatter. Read more
Source§

impl From<Accept> for Header

Source§

fn from(typed: Accept) -> Self

Converts to this type from the input type.
Source§

impl From<Accept> for Header

Source§

fn from(from: Accept) -> Self

Converts to this type from the input type.
Source§

impl From<AcceptEncoding> for Header

Source§

fn from(from: AcceptEncoding) -> Self

Converts to this type from the input type.
Source§

impl From<AcceptLanguage> for Header

Source§

fn from(from: AcceptLanguage) -> Self

Converts to this type from the input type.
Source§

impl From<AlertInfo> for Header

Source§

fn from(typed: AlertInfo) -> Self

Converts to this type from the input type.
Source§

impl From<AlertInfo> for Header

Source§

fn from(from: AlertInfo) -> Self

Converts to this type from the input type.
Source§

impl From<Allow> for Header

Source§

fn from(typed: Allow) -> Self

Converts to this type from the input type.
Source§

impl From<Allow> for Header

Source§

fn from(from: Allow) -> Self

Converts to this type from the input type.
Source§

impl From<AuthenticationInfo> for Header

Source§

fn from(typed: AuthenticationInfo) -> Self

Converts to this type from the input type.
Source§

impl From<AuthenticationInfo> for Header

Source§

fn from(from: AuthenticationInfo) -> Self

Converts to this type from the input type.
Source§

impl From<Authorization> for Header

Source§

fn from(typed: Authorization) -> Self

Converts to this type from the input type.
Source§

impl From<Authorization> for Header

Source§

fn from(from: Authorization) -> Self

Converts to this type from the input type.
Source§

impl From<CSeq> for Header

Source§

fn from(typed: CSeq) -> Self

Converts to this type from the input type.
Source§

impl From<CSeq> for Header

Source§

fn from(from: CSeq) -> Self

Converts to this type from the input type.
Source§

impl From<CallId> for Header

Source§

fn from(from: CallId) -> Self

Converts to this type from the input type.
Source§

impl From<CallInfo> for Header

Source§

fn from(typed: CallInfo) -> Self

Converts to this type from the input type.
Source§

impl From<CallInfo> for Header

Source§

fn from(from: CallInfo) -> Self

Converts to this type from the input type.
Source§

impl From<Contact> for Header

Source§

fn from(typed: Contact) -> Self

Converts to this type from the input type.
Source§

impl From<Contact> for Header

Source§

fn from(from: Contact) -> Self

Converts to this type from the input type.
Source§

impl From<ContentDisposition> for Header

Source§

fn from(typed: ContentDisposition) -> Self

Converts to this type from the input type.
Source§

impl From<ContentDisposition> for Header

Source§

fn from(from: ContentDisposition) -> Self

Converts to this type from the input type.
Source§

impl From<ContentEncoding> for Header

Source§

fn from(from: ContentEncoding) -> Self

Converts to this type from the input type.
Source§

impl From<ContentLanguage> for Header

Source§

fn from(from: ContentLanguage) -> Self

Converts to this type from the input type.
Source§

impl From<ContentLength> for Header

Source§

fn from(from: ContentLength) -> Self

Converts to this type from the input type.
Source§

impl From<ContentType> for Header

Source§

fn from(typed: ContentType) -> Self

Converts to this type from the input type.
Source§

impl From<ContentType> for Header

Source§

fn from(from: ContentType) -> Self

Converts to this type from the input type.
Source§

impl From<Date> for Header

Source§

fn from(from: Date) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorInfo> for Header

Source§

fn from(typed: ErrorInfo) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorInfo> for Header

Source§

fn from(from: ErrorInfo) -> Self

Converts to this type from the input type.
Source§

impl From<Event> for Header

Source§

fn from(from: Event) -> Self

Converts to this type from the input type.
Source§

impl From<Expires> for Header

Source§

fn from(from: Expires) -> Self

Converts to this type from the input type.
Source§

impl From<From> for Header

Source§

fn from(typed: From) -> Self

Converts to this type from the input type.
Source§

impl From<From> for Header

Source§

fn from(from: From) -> Self

Converts to this type from the input type.
Source§

impl From<Header> for Headers

Source§

fn from(header: Header) -> Self

Converts to this type from the input type.
Source§

impl From<InReplyTo> for Header

Source§

fn from(typed: InReplyTo) -> Self

Converts to this type from the input type.
Source§

impl From<InReplyTo> for Header

Source§

fn from(from: InReplyTo) -> Self

Converts to this type from the input type.
Source§

impl From<MaxForwards> for Header

Source§

fn from(from: MaxForwards) -> Self

Converts to this type from the input type.
Source§

impl From<MimeVersion> for Header

Source§

fn from(from: MimeVersion) -> Self

Converts to this type from the input type.
Source§

impl From<MinExpires> for Header

Source§

fn from(from: MinExpires) -> Self

Converts to this type from the input type.
Source§

impl From<Organization> for Header

Source§

fn from(from: Organization) -> Self

Converts to this type from the input type.
Source§

impl From<Priority> for Header

Source§

fn from(typed: Priority) -> Self

Converts to this type from the input type.
Source§

impl From<Priority> for Header

Source§

fn from(from: Priority) -> Self

Converts to this type from the input type.
Source§

impl From<ProxyAuthenticate> for Header

Source§

fn from(typed: ProxyAuthenticate) -> Self

Converts to this type from the input type.
Source§

impl From<ProxyAuthenticate> for Header

Source§

fn from(from: ProxyAuthenticate) -> Self

Converts to this type from the input type.
Source§

impl From<ProxyAuthorization> for Header

Source§

fn from(typed: ProxyAuthorization) -> Self

Converts to this type from the input type.
Source§

impl From<ProxyAuthorization> for Header

Source§

fn from(from: ProxyAuthorization) -> Self

Converts to this type from the input type.
Source§

impl From<ProxyRequire> for Header

Source§

fn from(from: ProxyRequire) -> Self

Converts to this type from the input type.
Source§

impl From<RecordRoute> for Header

Source§

fn from(typed: RecordRoute) -> Self

Converts to this type from the input type.
Source§

impl From<RecordRoute> for Header

Source§

fn from(from: RecordRoute) -> Self

Converts to this type from the input type.
Source§

impl From<ReplyTo> for Header

Source§

fn from(typed: ReplyTo) -> Self

Converts to this type from the input type.
Source§

impl From<ReplyTo> for Header

Source§

fn from(from: ReplyTo) -> Self

Converts to this type from the input type.
Source§

impl From<Require> for Header

Source§

fn from(from: Require) -> Self

Converts to this type from the input type.
Source§

impl From<RetryAfter> for Header

Source§

fn from(from: RetryAfter) -> Self

Converts to this type from the input type.
Source§

impl From<Route> for Header

Source§

fn from(typed: Route) -> Self

Converts to this type from the input type.
Source§

impl From<Route> for Header

Source§

fn from(from: Route) -> Self

Converts to this type from the input type.
Source§

impl From<Server> for Header

Source§

fn from(from: Server) -> Self

Converts to this type from the input type.
Source§

impl From<Subject> for Header

Source§

fn from(from: Subject) -> Self

Converts to this type from the input type.
Source§

impl From<SubscriptionState> for Header

Source§

fn from(from: SubscriptionState) -> Self

Converts to this type from the input type.
Source§

impl From<Supported> for Header

Source§

fn from(from: Supported) -> Self

Converts to this type from the input type.
Source§

impl From<Timestamp> for Header

Source§

fn from(from: Timestamp) -> Self

Converts to this type from the input type.
Source§

impl From<To> for Header

Source§

fn from(typed: To) -> Self

Converts to this type from the input type.
Source§

impl From<To> for Header

Source§

fn from(from: To) -> Self

Converts to this type from the input type.
Source§

impl From<Unsupported> for Header

Source§

fn from(from: Unsupported) -> Self

Converts to this type from the input type.
Source§

impl From<UserAgent> for Header

Source§

fn from(from: UserAgent) -> Self

Converts to this type from the input type.
Source§

impl From<Via> for Header

Source§

fn from(typed: Via) -> Self

Converts to this type from the input type.
Source§

impl From<Via> for Header

Source§

fn from(from: Via) -> Self

Converts to this type from the input type.
Source§

impl From<Warning> for Header

Source§

fn from(typed: Warning) -> Self

Converts to this type from the input type.
Source§

impl From<Warning> for Header

Source§

fn from(from: Warning) -> Self

Converts to this type from the input type.
Source§

impl From<WwwAuthenticate> for Header

Source§

fn from(typed: WwwAuthenticate) -> Self

Converts to this type from the input type.
Source§

impl From<WwwAuthenticate> for Header

Source§

fn from(from: WwwAuthenticate) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Header

Source§

fn eq(&self, other: &Header) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Header

Source§

impl StructuralPartialEq for Header

Auto Trait Implementations§

§

impl Freeze for Header

§

impl RefUnwindSafe for Header

§

impl Send for Header

§

impl Sync for Header

§

impl Unpin for Header

§

impl UnwindSafe for Header

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

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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§

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>,

Source§

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>,

Source§

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.