pub struct ConversionResult {
pub content: Option<String>,
pub document: Option<DocumentStructure>,
pub metadata: HtmlMetadata,
pub tables: Vec<TableData>,
pub warnings: Vec<ProcessingWarning>,
}Expand description
The primary result of HTML conversion and extraction.
Contains the converted text output, optional structured document tree, metadata, extracted tables, images, and processing warnings.
§Example
use html_to_markdown_rs::{convert, ConversionOptions};
let result = convert("<h1>Hello</h1><p>World</p>", None)?;
assert!(result.content.is_some());
assert!(result.warnings.is_empty());Fields§
§content: Option<String>Converted text output (markdown, djot, or plain text).
None when output_format is set to OutputFormat::None,
indicating extraction-only mode.
document: Option<DocumentStructure>Structured document tree with semantic elements.
Populated when include_document_structure is true in options.
metadata: HtmlMetadataExtracted HTML metadata (title, OG, links, images, structured data).
tables: Vec<TableData>Extracted tables with structured cell data and markdown representation.
warnings: Vec<ProcessingWarning>Non-fatal processing warnings.
Trait Implementations§
Source§impl Clone for ConversionResult
impl Clone for ConversionResult
Source§fn clone(&self) -> ConversionResult
fn clone(&self) -> ConversionResult
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 ConversionResult
impl Debug for ConversionResult
Source§impl Default for ConversionResult
impl Default for ConversionResult
Source§fn default() -> ConversionResult
fn default() -> ConversionResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConversionResult
impl<'de> Deserialize<'de> for ConversionResult
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 ConversionResult
impl RefUnwindSafe for ConversionResult
impl Send for ConversionResult
impl Sync for ConversionResult
impl Unpin for ConversionResult
impl UnsafeUnpin for ConversionResult
impl UnwindSafe for ConversionResult
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