pub struct TextArticle { /* private fields */ }Expand description
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:
from_binaryis fallible as it performs UTF-8 checksfrom_binary_lossyis infallible but will replace non UTF-8 characters with placeholders. Please seeString::from_utf8_lossyfor more info.
Implementationsยง
Sourceยงimpl TextArticle
impl TextArticle
Sourcepub fn number(&self) -> ArticleNumber
pub fn number(&self) -> ArticleNumber
The number of the article relative to the group it was retrieved from
Sourcepub fn message_id(&self) -> &str
pub fn message_id(&self) -> &str
The message id of the article
Sourcepub fn from_binary(b: &BinaryArticle) -> Result<Self>
pub fn from_binary(b: &BinaryArticle) -> Result<Self>
Create a text article from a
Sourcepub fn from_binary_lossy(b: &BinaryArticle) -> Self
pub fn from_binary_lossy(b: &BinaryArticle) -> Self
Create a text article from a binary one, replacing invalid UTF-8 characters with placeholders
Trait Implementationsยง
Sourceยงimpl Clone for TextArticle
impl Clone for TextArticle
Sourceยงfn clone(&self) -> TextArticle
fn clone(&self) -> TextArticle
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl Debug for TextArticle
impl Debug for TextArticle
Sourceยงimpl PartialEq for TextArticle
impl PartialEq for TextArticle
impl Eq for TextArticle
impl StructuralPartialEq for TextArticle
Auto Trait Implementationsยง
impl Freeze for TextArticle
impl RefUnwindSafe for TextArticle
impl Send for TextArticle
impl Sync for TextArticle
impl Unpin for TextArticle
impl UnsafeUnpin for TextArticle
impl UnwindSafe for TextArticle
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more