Struct http_auth::ParamValue
source · pub struct ParamValue<'i> { /* private fields */ }
Expand description
Parsed challenge parameter value used within ChallengeRef
.
Implementations§
source§impl<'i> ParamValue<'i>
impl<'i> ParamValue<'i>
sourcepub fn try_from_escaped(escaped: &'i str) -> Result<Self, String>
pub fn try_from_escaped(escaped: &'i str) -> Result<Self, String>
Tries to create a new ParamValue
from an escaped sequence, primarily for testing.
Validates the sequence and counts the number of escapes.
sourcepub fn append_unescaped(&self, to: &mut String)
pub fn append_unescaped(&self, to: &mut String)
Appends the unescaped form of this parameter to the supplied string.
sourcepub fn unescaped_len(&self) -> usize
pub fn unescaped_len(&self) -> usize
Returns the unescaped length of this parameter; cheap.
sourcepub fn to_unescaped(&self) -> String
pub fn to_unescaped(&self) -> String
Returns the unescaped form of this parameter as a fresh String
.
sourcepub fn as_escaped(&self) -> &'i str
pub fn as_escaped(&self) -> &'i str
Returns the escaped string, unquoted.
Trait Implementations§
source§impl<'i> Clone for ParamValue<'i>
impl<'i> Clone for ParamValue<'i>
source§fn clone(&self) -> ParamValue<'i>
fn clone(&self) -> ParamValue<'i>
Returns a copy 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<'i> Debug for ParamValue<'i>
impl<'i> Debug for ParamValue<'i>
source§impl<'i> PartialEq<ParamValue<'i>> for ParamValue<'i>
impl<'i> PartialEq<ParamValue<'i>> for ParamValue<'i>
source§fn eq(&self, other: &ParamValue<'i>) -> bool
fn eq(&self, other: &ParamValue<'i>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.