pub struct HeaderValue { /* private fields */ }
Expand description
A struct representing value of a given header. Can contain one or more elements.
§Examples
use std::str::FromStr;
let mut headers = async_nats::HeaderMap::new();
headers.insert("Key", "Value");
headers.insert("Another", async_nats::HeaderValue::from_str("AnotherValue")?);
Implementations§
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 Default for HeaderValue
impl Default for HeaderValue
Source§fn default() -> HeaderValue
fn default() -> HeaderValue
Returns the “default value” for a type. Read more
Source§impl<'a> From<&'a HeaderValue> for &'a str
impl<'a> From<&'a HeaderValue> for &'a str
Source§fn from(header: &'a HeaderValue) -> Self
fn from(header: &'a HeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<&HeaderValue> for String
impl From<&HeaderValue> for String
Source§fn from(header: &HeaderValue) -> Self
fn from(header: &HeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<&str> for HeaderValue
impl From<&str> for HeaderValue
Source§impl From<HeaderValue> for String
impl From<HeaderValue> for String
Source§fn from(header: HeaderValue) -> Self
fn from(header: HeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<u64> for HeaderValue
impl From<u64> for HeaderValue
Source§impl FromStr for HeaderValue
impl FromStr for HeaderValue
Source§impl IntoHeaderValue for HeaderValue
impl IntoHeaderValue for HeaderValue
fn into_header_value(self) -> HeaderValue
Source§impl IntoIterator for HeaderValue
impl IntoIterator for HeaderValue
Source§impl PartialEq for HeaderValue
impl PartialEq for HeaderValue
Source§impl Serialize for HeaderValue
impl Serialize for HeaderValue
Source§impl ToString for HeaderValue
impl ToString for HeaderValue
impl Eq 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