#[non_exhaustive]pub struct SipAuthValue { /* private fields */ }Expand description
Parsed SIP authentication value.
Covers Authorization, Proxy-Authorization, WWW-Authenticate, and Proxy-Authenticate header field values.
Grammar: scheme SP param=val *(COMMA param=val), or scheme SP token68
(RFC 7235 §2.1).
Implementations§
Source§impl SipAuthValue
impl SipAuthValue
Sourcepub fn token68(&self) -> Option<&str>
pub fn token68(&self) -> Option<&str>
Returns the token68 credential (RFC 7235 §2.1), such as an RFC 8898
Bearer access token, when the value carries one instead of parameters.
Sourcepub fn params(&self) -> &[(String, String)]
pub fn params(&self) -> &[(String, String)]
Returns all authentication parameters as key-value pairs.
Keys are lowercased. Values have quotes stripped.
Source§impl SipAuthValue
impl SipAuthValue
Sourcepub fn parse(s: &str) -> Result<Self, SipAuthError>
pub fn parse(s: &str) -> Result<Self, SipAuthError>
Parse an authentication header value.
Trait Implementations§
Source§impl Clone for SipAuthValue
impl Clone for SipAuthValue
Source§impl Debug for SipAuthValue
impl Debug for SipAuthValue
Source§impl Display for SipAuthValue
impl Display for SipAuthValue
impl Eq for SipAuthValue
Source§impl FromStr for SipAuthValue
impl FromStr for SipAuthValue
Source§impl PartialEq for SipAuthValue
impl PartialEq for SipAuthValue
impl StructuralPartialEq for SipAuthValue
Auto Trait Implementations§
impl Freeze for SipAuthValue
impl RefUnwindSafe for SipAuthValue
impl Send for SipAuthValue
impl Sync for SipAuthValue
impl Unpin for SipAuthValue
impl UnsafeUnpin for SipAuthValue
impl UnwindSafe for SipAuthValue
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