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 From<AcceptEncoding> for Header
impl From<AcceptEncoding> for Header
Source§fn from(from: AcceptEncoding) -> Self
fn from(from: AcceptEncoding) -> Self
Converts to this type from the input type.
Source§impl From<AcceptLanguage> for Header
impl From<AcceptLanguage> for Header
Source§fn from(from: AcceptLanguage) -> Self
fn from(from: AcceptLanguage) -> Self
Converts to this type from the input type.
Source§impl From<AuthenticationInfo> for Header
impl From<AuthenticationInfo> for Header
Source§fn from(typed: AuthenticationInfo) -> Self
fn from(typed: AuthenticationInfo) -> Self
Converts to this type from the input type.
Source§impl From<AuthenticationInfo> for Header
impl From<AuthenticationInfo> for Header
Source§fn from(from: AuthenticationInfo) -> Self
fn from(from: AuthenticationInfo) -> Self
Converts to this type from the input type.
Source§impl From<Authorization> for Header
impl From<Authorization> for Header
Source§fn from(typed: Authorization) -> Self
fn from(typed: Authorization) -> Self
Converts to this type from the input type.
Source§impl From<Authorization> for Header
impl From<Authorization> for Header
Source§fn from(from: Authorization) -> Self
fn from(from: Authorization) -> Self
Converts to this type from the input type.
Source§impl From<ContentDisposition> for Header
impl From<ContentDisposition> for Header
Source§fn from(typed: ContentDisposition) -> Self
fn from(typed: ContentDisposition) -> Self
Converts to this type from the input type.
Source§impl From<ContentDisposition> for Header
impl From<ContentDisposition> for Header
Source§fn from(from: ContentDisposition) -> Self
fn from(from: ContentDisposition) -> Self
Converts to this type from the input type.
Source§impl From<ContentEncoding> for Header
impl From<ContentEncoding> for Header
Source§fn from(from: ContentEncoding) -> Self
fn from(from: ContentEncoding) -> Self
Converts to this type from the input type.
Source§impl From<ContentLanguage> for Header
impl From<ContentLanguage> for Header
Source§fn from(from: ContentLanguage) -> Self
fn from(from: ContentLanguage) -> Self
Converts to this type from the input type.
Source§impl From<ContentLength> for Header
impl From<ContentLength> for Header
Source§fn from(from: ContentLength) -> Self
fn from(from: ContentLength) -> Self
Converts to this type from the input type.
Source§impl From<ContentType> for Header
impl From<ContentType> for Header
Source§fn from(typed: ContentType) -> Self
fn from(typed: ContentType) -> Self
Converts to this type from the input type.
Source§impl From<ContentType> for Header
impl From<ContentType> for Header
Source§fn from(from: ContentType) -> Self
fn from(from: ContentType) -> Self
Converts to this type from the input type.
Source§impl From<MaxForwards> for Header
impl From<MaxForwards> for Header
Source§fn from(from: MaxForwards) -> Self
fn from(from: MaxForwards) -> Self
Converts to this type from the input type.
Source§impl From<MimeVersion> for Header
impl From<MimeVersion> for Header
Source§fn from(from: MimeVersion) -> Self
fn from(from: MimeVersion) -> Self
Converts to this type from the input type.
Source§impl From<MinExpires> for Header
impl From<MinExpires> for Header
Source§fn from(from: MinExpires) -> Self
fn from(from: MinExpires) -> Self
Converts to this type from the input type.
Source§impl From<Organization> for Header
impl From<Organization> for Header
Source§fn from(from: Organization) -> Self
fn from(from: Organization) -> Self
Converts to this type from the input type.
Source§impl From<ProxyAuthenticate> for Header
impl From<ProxyAuthenticate> for Header
Source§fn from(typed: ProxyAuthenticate) -> Self
fn from(typed: ProxyAuthenticate) -> Self
Converts to this type from the input type.
Source§impl From<ProxyAuthenticate> for Header
impl From<ProxyAuthenticate> for Header
Source§fn from(from: ProxyAuthenticate) -> Self
fn from(from: ProxyAuthenticate) -> Self
Converts to this type from the input type.
Source§impl From<ProxyAuthorization> for Header
impl From<ProxyAuthorization> for Header
Source§fn from(typed: ProxyAuthorization) -> Self
fn from(typed: ProxyAuthorization) -> Self
Converts to this type from the input type.
Source§impl From<ProxyAuthorization> for Header
impl From<ProxyAuthorization> for Header
Source§fn from(from: ProxyAuthorization) -> Self
fn from(from: ProxyAuthorization) -> Self
Converts to this type from the input type.
Source§impl From<ProxyRequire> for Header
impl From<ProxyRequire> for Header
Source§fn from(from: ProxyRequire) -> Self
fn from(from: ProxyRequire) -> Self
Converts to this type from the input type.
Source§impl From<RecordRoute> for Header
impl From<RecordRoute> for Header
Source§fn from(typed: RecordRoute) -> Self
fn from(typed: RecordRoute) -> Self
Converts to this type from the input type.
Source§impl From<RecordRoute> for Header
impl From<RecordRoute> for Header
Source§fn from(from: RecordRoute) -> Self
fn from(from: RecordRoute) -> Self
Converts to this type from the input type.
Source§impl From<RetryAfter> for Header
impl From<RetryAfter> for Header
Source§fn from(from: RetryAfter) -> Self
fn from(from: RetryAfter) -> Self
Converts to this type from the input type.
Source§impl From<SubscriptionState> for Header
impl From<SubscriptionState> for Header
Source§fn from(from: SubscriptionState) -> Self
fn from(from: SubscriptionState) -> Self
Converts to this type from the input type.
Source§impl From<Unsupported> for Header
impl From<Unsupported> for Header
Source§fn from(from: Unsupported) -> Self
fn from(from: Unsupported) -> Self
Converts to this type from the input type.
Source§impl From<WwwAuthenticate> for Header
impl From<WwwAuthenticate> for Header
Source§fn from(typed: WwwAuthenticate) -> Self
fn from(typed: WwwAuthenticate) -> Self
Converts to this type from the input type.
Source§impl From<WwwAuthenticate> for Header
impl From<WwwAuthenticate> for Header
Source§fn from(from: WwwAuthenticate) -> Self
fn from(from: WwwAuthenticate) -> Self
Converts to this type from the input type.
impl Eq for Header
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> 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
Mutably borrows from an owned value. Read more