[][src]Struct brokaw::types::Headers

pub struct Headers { /* fields omitted */ }

Netnews article headers

Note that per RFC 5322 headers may be repeated (a common example is X-Received for emails mirrored onto Newsgroups)

Implementations

impl Headers[src]

pub fn len(&self) -> usize[src]

The total number of headers

Note that this may be more than the number of keys as headers may be repeated

pub fn is_empty(&self) -> bool[src]

Returns true if there are no headers

pub fn get(&self, key: impl AsRef<str>) -> Option<&Header>[src]

Get a header by name

pub fn iter(&self) -> Iter[src]

An iterator over the headers

Trait Implementations

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> 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, 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.