Expand description
Typed header values.
Headers are parsed on demand, never during message parsing. A message with a malformed
CSeq frames and forwards perfectly well; only a party that needs to read CSeq has a
problem, and it finds out by asking:
match message.headers().typed::<CSeq>() {
None => { /* absent */ }
Some(Err(_)) => { /* present and malformed — answer 400 */ }
Some(Ok(cseq)) => { /* usable */ }
}The Option<Result<..>> is deliberate. Collapsing it is how implementations end up
treating a corrupt header as a missing one.
Authentication headers are not here: they belong to the user-agent layer, which is where anything that can act on a challenge lives.
Re-exports§
pub use address::Address;pub use address::Contact;pub use address::ContactValue;pub use address::From;pub use address::RecordRoute;pub use address::Route;pub use address::To;pub use history::HistoryEntry;pub use history::HistoryIndex;pub use history::HistoryInfo;pub use history::Reason;pub use history::ReasonValue;pub use history::TargetChange;pub use history::TargetChangeKind;pub use identity::IgnoredIdentity;pub use identity::IgnoredIdentityReason;pub use identity::PAssertedIdentity;pub use identity::PAssertedIdentityList;pub use identity::PPreferredIdentity;pub use identity::PPreferredIdentityList;pub use misc::Allow;pub use misc::CSeq;pub use misc::CallId;pub use misc::ContentLength;pub use misc::ContentType;pub use misc::Date;pub use misc::Expires;pub use misc::MaxForwards;pub use misc::ProxyRequire;pub use misc::Require;pub use misc::Supported;pub use misc::TokenList;pub use misc::Unsupported;pub use privacy::Privacy;pub use privacy::PrivacyList;pub use privacy::PrivacyValue;pub use via::BRANCH_MAGIC_COOKIE;pub use via::OcParameter;pub use via::OverloadAlgorithm;pub use via::OverloadSequence;pub use via::Via;pub use via::ViaOverload;pub use via::first_hop_end;
Modules§
- address
- Address headers:
From,To,Contact,Route,Record-Route,Refer-To. - history
- Diversion history and call reasons (RFC 7044 and RFC 3326).
- identity
- RFC 3325 asserted and preferred identity header values.
- misc
- The remaining headers the core needs:
CSeq,Call-ID, the scalars,Content-Type,Date, and the token-list headers. - privacy
- Privacy preferences (RFC 3323 §4.2 and verified erratum 5184).
- via
- The
Viaheader (RFC 3261 §20.42).
Structs§
- Header
Param - One header parameter:
nameorname=value, where the value may be quoted.