Struct async_nats::header::HeaderValue
source · 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<HeaderValue> for HeaderValue
impl PartialEq<HeaderValue> for HeaderValue
source§fn eq(&self, other: &HeaderValue) -> bool
fn eq(&self, other: &HeaderValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.