[][src]Struct brokaw::raw::DataBlocks

pub struct DataBlocks { /* fields omitted */ }

The Multi-line Data Blocks portion of an NNTP response

Usage

DataBlocks::payload returns the raw bytes in the payload

Implementations

impl DataBlocks[src]

pub fn payload(&self) -> &[u8][src]

Return the raw contained by the payload of the Datablocks

pub fn payload_as_utf8(&self) -> Result<&str, Utf8Error>[src]

A convenience function that simply calls from_utf8

pub fn lines(&self) -> Lines[src]

An iterator over the lines within the data block

pub fn unterminated(&self) -> Unterminated[src]

An iterator over the unterminated data block

  1. Lines yielded by this iterator WILL NOT include the CRLF terminator
  2. The final line of the message containing only . will not be returend

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

The number of lines

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

The number of bytes in the data block

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

Returns true if there are no lines

Trait Implementations

impl Clone for DataBlocks[src]

impl Debug for DataBlocks[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, 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.