pub struct ParsedContent {
pub metadata: PageMetadata,
pub text: TextContent,
pub headings: Vec<Heading>,
pub paragraphs: Vec<String>,
pub links: Vec<Link>,
pub images: Vec<Image>,
pub lists: Vec<ListContent>,
pub tables: Vec<TableContent>,
pub code_blocks: Vec<CodeBlock>,
pub quotes: Vec<Quote>,
pub structured_data: Vec<StructuredData>,
pub stats: ParseStats,
}Expand description
Complete parsed content from an HTML document
Fields§
§metadata: PageMetadataPage metadata
text: TextContentExtracted text content
headings: Vec<Heading>All headings
paragraphs: Vec<String>All paragraphs
links: Vec<Link>All links
images: Vec<Image>All images
lists: Vec<ListContent>All lists
tables: Vec<TableContent>All tables
code_blocks: Vec<CodeBlock>All code blocks
quotes: Vec<Quote>All quotes
structured_data: Vec<StructuredData>Structured data (JSON-LD, Microdata, RDFa)
stats: ParseStatsParsing statistics
Implementations§
Source§impl ParsedContent
impl ParsedContent
Sourcepub fn internal_links(&self) -> Vec<&Link>
pub fn internal_links(&self) -> Vec<&Link>
Get internal links only
Sourcepub fn external_links(&self) -> Vec<&Link>
pub fn external_links(&self) -> Vec<&Link>
Get external links only
Sourcepub fn followable_links(&self) -> Vec<&Link>
pub fn followable_links(&self) -> Vec<&Link>
Get followable links only
Sourcepub fn has_structured_data(&self) -> bool
pub fn has_structured_data(&self) -> bool
Check if page has structured data
Trait Implementations§
Source§impl Clone for ParsedContent
impl Clone for ParsedContent
Source§fn clone(&self) -> ParsedContent
fn clone(&self) -> ParsedContent
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 ParsedContent
impl Debug for ParsedContent
Source§impl Default for ParsedContent
impl Default for ParsedContent
Source§fn default() -> ParsedContent
fn default() -> ParsedContent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ParsedContent
impl<'de> Deserialize<'de> for ParsedContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ParsedContent
impl RefUnwindSafe for ParsedContent
impl Send for ParsedContent
impl Sync for ParsedContent
impl Unpin for ParsedContent
impl UnwindSafe for ParsedContent
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