[][src]Struct libsip::NamedHeader

pub struct NamedHeader {
    pub display_name: Option<String>,
    pub uri: Uri,
    pub parameters: HashMap<String, Option<String>>,
}

Header Value for Named Headers, e.g. From, To, Contact

Fields

display_name: Option<String>uri: Uriparameters: HashMap<String, Option<String>>

Implementations

impl NamedHeader[src]

pub fn new(uri: Uri) -> NamedHeader[src]

pub fn name<S: Into<String>>(self, name: S) -> Self[src]

Sets display_name of this header

pub fn param<N, V>(self, name: N, value: Option<V>) -> Self where
    N: Into<String>,
    V: Into<String>, 
[src]

Adds a parameter with a given name and a given value to params.

If there is already a parameter with a given name, its value is changed because RFC3261: Page 31, Header Field Format defines that "any given parameter-name MUST NOT appear more than once"

pub fn set_param<N, V>(&mut self, name: N, value: Option<V>) where
    N: Into<String>,
    V: Into<String>, 
[src]

Adds a parameter with a given name and a given value to params.

If there is already a parameter with a given name, its value is changed because RFC3261: Page 31, Header Field Format defines that "any given parameter-name MUST NOT appear more than once"

Trait Implementations

impl Clone for NamedHeader[src]

impl Debug for NamedHeader[src]

impl Display for NamedHeader[src]

impl PartialEq<NamedHeader> for NamedHeader[src]

impl StructuralPartialEq for NamedHeader[src]

Auto Trait Implementations

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,