[][src]Struct viaduct::Header

pub struct Header {
    pub(crate) name: HeaderName,
    pub(crate) value: String,
}

A single header. Headers have a name (case insensitive) and a value. The character set for header and values are both restrictive.

Note that typically you should not interact with this directly, and instead use the methods on [Request] or [Headers] to manipulate these.

Fields

name: HeaderNamevalue: String

Implementations

impl Header[src]

pub fn new<Name, Value>(name: Name, value: Value) -> Result<Self, Error> where
    Name: Into<HeaderName>,
    Value: AsRef<str> + Into<String>, 
[src]

pub fn new_unchecked<Value>(name: HeaderName, value: Value) -> Self where
    Value: AsRef<str> + Into<String>, 
[src]

pub fn name(&self) -> &HeaderName[src]

pub fn value(&self) -> &str[src]

fn set_value<V: AsRef<str>>(&mut self, s: V) -> Result<(), Error>[src]

Trait Implementations

impl Clone for Header[src]

impl Debug for Header[src]

impl Display for Header[src]

impl Eq for Header[src]

impl FromIterator<Header> for Headers[src]

impl Hash for Header[src]

impl Ord for Header[src]

impl PartialEq<Header> for Header[src]

impl PartialOrd<Header> for Header[src]

impl StructuralEq for Header[src]

impl StructuralPartialEq for Header[src]

Auto Trait Implementations

impl RefUnwindSafe for Header

impl Send for Header

impl Sync for Header

impl Unpin for Header

impl UnwindSafe for Header

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.