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 = 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
sourceimpl From<AcceptEncoding> for Header
impl From<AcceptEncoding> for Header
sourcefn from(from: AcceptEncoding) -> Self
fn from(from: AcceptEncoding) -> Self
Converts to this type from the input type.
sourceimpl From<AcceptLanguage> for Header
impl From<AcceptLanguage> for Header
sourcefn from(from: AcceptLanguage) -> Self
fn from(from: AcceptLanguage) -> Self
Converts to this type from the input type.
sourceimpl From<AuthenticationInfo> for Header
impl From<AuthenticationInfo> for Header
sourcefn from(typed: AuthenticationInfo) -> Self
fn from(typed: AuthenticationInfo) -> Self
Converts to this type from the input type.
sourceimpl From<AuthenticationInfo> for Header
impl From<AuthenticationInfo> for Header
sourcefn from(from: AuthenticationInfo) -> Self
fn from(from: AuthenticationInfo) -> Self
Converts to this type from the input type.
sourceimpl From<Authorization> for Header
impl From<Authorization> for Header
sourcefn from(typed: Authorization) -> Self
fn from(typed: Authorization) -> Self
Converts to this type from the input type.
sourceimpl From<Authorization> for Header
impl From<Authorization> for Header
sourcefn from(from: Authorization) -> Self
fn from(from: Authorization) -> Self
Converts to this type from the input type.
sourceimpl From<ContentDisposition> for Header
impl From<ContentDisposition> for Header
sourcefn from(typed: ContentDisposition) -> Self
fn from(typed: ContentDisposition) -> Self
Converts to this type from the input type.
sourceimpl From<ContentDisposition> for Header
impl From<ContentDisposition> for Header
sourcefn from(from: ContentDisposition) -> Self
fn from(from: ContentDisposition) -> Self
Converts to this type from the input type.
sourceimpl From<ContentEncoding> for Header
impl From<ContentEncoding> for Header
sourcefn from(from: ContentEncoding) -> Self
fn from(from: ContentEncoding) -> Self
Converts to this type from the input type.
sourceimpl From<ContentLanguage> for Header
impl From<ContentLanguage> for Header
sourcefn from(from: ContentLanguage) -> Self
fn from(from: ContentLanguage) -> Self
Converts to this type from the input type.
sourceimpl From<ContentLength> for Header
impl From<ContentLength> for Header
sourcefn from(from: ContentLength) -> Self
fn from(from: ContentLength) -> Self
Converts to this type from the input type.
sourceimpl From<ContentType> for Header
impl From<ContentType> for Header
sourcefn from(typed: ContentType) -> Self
fn from(typed: ContentType) -> Self
Converts to this type from the input type.
sourceimpl From<ContentType> for Header
impl From<ContentType> for Header
sourcefn from(from: ContentType) -> Self
fn from(from: ContentType) -> Self
Converts to this type from the input type.
sourceimpl From<MaxForwards> for Header
impl From<MaxForwards> for Header
sourcefn from(from: MaxForwards) -> Self
fn from(from: MaxForwards) -> Self
Converts to this type from the input type.
sourceimpl From<MimeVersion> for Header
impl From<MimeVersion> for Header
sourcefn from(from: MimeVersion) -> Self
fn from(from: MimeVersion) -> Self
Converts to this type from the input type.
sourceimpl From<MinExpires> for Header
impl From<MinExpires> for Header
sourcefn from(from: MinExpires) -> Self
fn from(from: MinExpires) -> Self
Converts to this type from the input type.
sourceimpl From<Organization> for Header
impl From<Organization> for Header
sourcefn from(from: Organization) -> Self
fn from(from: Organization) -> Self
Converts to this type from the input type.
sourceimpl From<ProxyAuthenticate> for Header
impl From<ProxyAuthenticate> for Header
sourcefn from(typed: ProxyAuthenticate) -> Self
fn from(typed: ProxyAuthenticate) -> Self
Converts to this type from the input type.
sourceimpl From<ProxyAuthenticate> for Header
impl From<ProxyAuthenticate> for Header
sourcefn from(from: ProxyAuthenticate) -> Self
fn from(from: ProxyAuthenticate) -> Self
Converts to this type from the input type.
sourceimpl From<ProxyAuthorization> for Header
impl From<ProxyAuthorization> for Header
sourcefn from(typed: ProxyAuthorization) -> Self
fn from(typed: ProxyAuthorization) -> Self
Converts to this type from the input type.
sourceimpl From<ProxyAuthorization> for Header
impl From<ProxyAuthorization> for Header
sourcefn from(from: ProxyAuthorization) -> Self
fn from(from: ProxyAuthorization) -> Self
Converts to this type from the input type.
sourceimpl From<ProxyRequire> for Header
impl From<ProxyRequire> for Header
sourcefn from(from: ProxyRequire) -> Self
fn from(from: ProxyRequire) -> Self
Converts to this type from the input type.
sourceimpl From<RecordRoute> for Header
impl From<RecordRoute> for Header
sourcefn from(typed: RecordRoute) -> Self
fn from(typed: RecordRoute) -> Self
Converts to this type from the input type.
sourceimpl From<RecordRoute> for Header
impl From<RecordRoute> for Header
sourcefn from(from: RecordRoute) -> Self
fn from(from: RecordRoute) -> Self
Converts to this type from the input type.
sourceimpl From<RetryAfter> for Header
impl From<RetryAfter> for Header
sourcefn from(from: RetryAfter) -> Self
fn from(from: RetryAfter) -> Self
Converts to this type from the input type.
sourceimpl From<SubscriptionState> for Header
impl From<SubscriptionState> for Header
sourcefn from(from: SubscriptionState) -> Self
fn from(from: SubscriptionState) -> Self
Converts to this type from the input type.
sourceimpl From<Unsupported> for Header
impl From<Unsupported> for Header
sourcefn from(from: Unsupported) -> Self
fn from(from: Unsupported) -> Self
Converts to this type from the input type.
sourceimpl From<WwwAuthenticate> for Header
impl From<WwwAuthenticate> for Header
sourcefn from(typed: WwwAuthenticate) -> Self
fn from(typed: WwwAuthenticate) -> Self
Converts to this type from the input type.
sourceimpl From<WwwAuthenticate> for Header
impl From<WwwAuthenticate> for Header
sourcefn from(from: WwwAuthenticate) -> Self
fn from(from: WwwAuthenticate) -> Self
Converts to this type from the input type.
impl Eq for Header
impl StructuralEq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more