[][src]Struct brokaw::types::TextArticle

pub struct TextArticle { /* fields omitted */ }

A text Netnews article returned by the ARTICLE command

Unlike BinaryArticle a TextArticleMUST have a UTF-8 body.

The following methods can be used to create a TextArticle from a BinaryArticle:

Implementations

impl TextArticle[src]

pub fn number(&self) -> ArticleNumber[src]

The number of the article relative to the group it was retrieved from

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

The message id of the article

pub fn headers(&self) -> &Headers[src]

The headers on the article

pub fn body(&self) -> &[String][src]

Return the body of the article

pub fn from_binary(b: &BinaryArticle) -> Result<Self>[src]

Create a text article from a

pub fn from_binary_lossy(b: &BinaryArticle) -> Self[src]

Create a text article from a binary one, replacing invalid UTF-8 characters with placeholders

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

An iterator over the lines in the body of the article

Each line will not include the CRLF terminator

Trait Implementations

impl Clone for TextArticle[src]

impl Debug for TextArticle[src]

impl Eq for TextArticle[src]

impl PartialEq<TextArticle> for TextArticle[src]

impl StructuralEq for TextArticle[src]

impl StructuralPartialEq for TextArticle[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.