pub struct HeaderValue { /* private fields */ }Expand description
A safe for use header value
Implementations§
Source§impl HeaderValue
 
impl HeaderValue
Sourcepub fn new(name: HeaderName, raw_value: String) -> Self
 
pub fn new(name: HeaderName, raw_value: String) -> Self
Construct a new HeaderValue and encode it
Takes the header name and the raw_value and encodes
it via RFC2047 and line folds it.
Sourcepub fn dangerous_new_pre_encoded(
    name: HeaderName,
    raw_value: String,
    encoded_value: String,
) -> Self
 
pub fn dangerous_new_pre_encoded( name: HeaderName, raw_value: String, encoded_value: String, ) -> Self
Construct a new HeaderValue using a pre-encoded header value
This method is extremely dangerous as it opens up
the encoder to header injection attacks, but is sometimes
acceptable for use if encoded_value contains only ascii
printable characters and is already line folded.
When in doubt, use HeaderValue::new.
Trait Implementations§
Source§impl Clone for HeaderValue
 
impl Clone for HeaderValue
Source§fn clone(&self) -> HeaderValue
 
fn clone(&self) -> HeaderValue
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 Debug for HeaderValue
 
impl Debug for HeaderValue
Source§impl PartialEq for HeaderValue
 
impl PartialEq for HeaderValue
impl StructuralPartialEq for HeaderValue
Auto Trait Implementations§
impl Freeze for HeaderValue
impl RefUnwindSafe for HeaderValue
impl Send for HeaderValue
impl Sync for HeaderValue
impl Unpin for HeaderValue
impl UnwindSafe for HeaderValue
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<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more