pub struct HistoryInfoEntry { /* private fields */ }Expand description
A single entry from a History-Info header (RFC 7044).
Each entry is a SIP name-addr (<URI>;params) where the URI may contain
an embedded ?Reason=... header and the params typically include index.
Implementations§
Source§impl HistoryInfoEntry
impl HistoryInfoEntry
Sourcepub fn addr(&self) -> &SipHeaderAddr
pub fn addr(&self) -> &SipHeaderAddr
The underlying parsed name-addr with header-level parameters.
Sourcepub fn sip_uri(&self) -> Option<&SipUri>
pub fn sip_uri(&self) -> Option<&SipUri>
The SIP URI, if this entry uses a sip: or sips: scheme.
Sourcepub fn reason_raw(&self) -> Option<&str>
pub fn reason_raw(&self) -> Option<&str>
Raw percent-encoded Reason value from the URI ?Reason=... header.
Returns None if the URI is not a SIP URI or has no Reason header.
Sourcepub fn reason(&self) -> Option<Result<HistoryInfoReason, Utf8Error>>
pub fn reason(&self) -> Option<Result<HistoryInfoReason, Utf8Error>>
Parse the Reason header embedded in the URI.
The Reason value is percent-decoded (with + treated as space,
matching common SIP URI encoding conventions) and parsed into
protocol, cause code, and text components per RFC 3326.
Returns None if no Reason is present, Err if percent-decoding
produces invalid UTF-8.
Trait Implementations§
Source§impl Clone for HistoryInfoEntry
impl Clone for HistoryInfoEntry
Source§fn clone(&self) -> HistoryInfoEntry
fn clone(&self) -> HistoryInfoEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HistoryInfoEntry
impl Debug for HistoryInfoEntry
Source§impl Display for HistoryInfoEntry
impl Display for HistoryInfoEntry
Source§impl PartialEq for HistoryInfoEntry
impl PartialEq for HistoryInfoEntry
impl Eq for HistoryInfoEntry
impl StructuralPartialEq for HistoryInfoEntry
Auto Trait Implementations§
impl Freeze for HistoryInfoEntry
impl RefUnwindSafe for HistoryInfoEntry
impl Send for HistoryInfoEntry
impl Sync for HistoryInfoEntry
impl Unpin for HistoryInfoEntry
impl UnsafeUnpin for HistoryInfoEntry
impl UnwindSafe for HistoryInfoEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.