[][src]Struct rtsp_types::headers::Headers

pub struct Headers(_);

A collection of RTSP headers together with their values.

Request and Response implement AsRef<Headers> and `AsMut, which allows functions working with headers to be implemented generically over those traits.

Implementations

impl Headers[src]

pub fn insert<V: Into<HeaderValue>>(&mut self, name: HeaderName, value: V)[src]

Insert an RTSP header with its value.

If a header with the same name already exists then its value will be replaced.

See append for appending additional values to a header.

pub fn remove(&mut self, name: &HeaderName)[src]

Removes and RTSP header if it exists.

pub fn append<V: Into<HeaderValue>>(&mut self, name: HeaderName, value: V)[src]

Appends a value to an existing RTSP header or inserts it.

Additional values are comma separated as defined in RFC 7826 section 5.2.

pub fn get(&self, name: &HeaderName) -> Option<&HeaderValue>[src]

Gets an RTSP header value if it exists.

pub fn get_mut(&mut self, name: &HeaderName) -> Option<&mut HeaderValue>[src]

Gets a mutable reference to an RTSP header value if it exists.

pub fn iter(&self) -> impl Iterator<Item = (&HeaderName, &HeaderValue)>[src]

Iterator over all header name and value pairs.

pub fn names(&self) -> impl Iterator<Item = &HeaderName>[src]

Iterator over all header names.

pub fn values(&self) -> impl Iterator<Item = &HeaderValue>[src]

Iterator over all header values.

Trait Implementations

impl<Body> AsMut<Headers> for Request<Body>[src]

impl<Body> AsMut<Headers> for Response<Body>[src]

impl AsMut<Headers> for Headers[src]

impl<Body> AsRef<Headers> for Request<Body>[src]

impl<Body> AsRef<Headers> for Response<Body>[src]

impl AsRef<Headers> for Headers[src]

impl Clone for Headers[src]

impl Debug for Headers[src]

impl Eq for Headers[src]

impl PartialEq<Headers> for Headers[src]

impl StructuralEq for Headers[src]

impl StructuralPartialEq for Headers[src]

Auto Trait Implementations

impl RefUnwindSafe for Headers

impl Send for Headers

impl Sync for Headers

impl Unpin for Headers

impl UnwindSafe for Headers

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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.