pub struct Article {
pub title: String,
pub content: String,
pub text_content: String,
pub length: u32,
pub byline: Option<String>,
pub direction: Option<Direction>,
pub excerpt: Option<String>,
pub site_name: Option<String>,
pub language: Option<String>,
pub published_time: Option<String>,
}
Expand description
Parsed article content and metadata extracted by Readability.
All fields except title
, content
, text_content
, and length
are optional
and depend on the input HTML having appropriate metadata.
Fields§
§title: String
Extracted or inferred article title
content: String
Clean HTML content (safe for display)
text_content: String
Plain text with all HTML stripped
length: u32
Character count of the content
byline: Option<String>
Author byline metadata
direction: Option<Direction>
Content direction
excerpt: Option<String>
Article description or short excerpt
site_name: Option<String>
Name of the website
language: Option<String>
Content language code (BCP 47), if detectable
published_time: Option<String>
Published time in ISO 8601 or site format, if detectable
Trait Implementations§
Source§impl<'js> TryFrom<Value<'js>> for Article
impl<'js> TryFrom<Value<'js>> for Article
Source§type Error = ReadabilityError
type Error = ReadabilityError
The type returned in the event of a conversion error.
impl StructuralPartialEq for Article
Auto Trait Implementations§
impl Freeze for Article
impl RefUnwindSafe for Article
impl Send for Article
impl Sync for Article
impl Unpin for Article
impl UnwindSafe for Article
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