pub struct Document {
pub markdown: Option<String>,
pub html: Option<String>,
pub raw_html: Option<String>,
pub screenshot: Option<String>,
pub links: Option<Vec<String>>,
pub extract: Option<Value>,
pub json: Option<Value>,
pub actions: Option<ActionResults>,
pub metadata: DocumentMetadata,
pub warning: Option<String>,
}Fields§
§markdown: Option<String>A list of the links on the page, present if ScrapeFormats::Markdown is present in ScrapeOptions.formats. (default)
html: Option<String>The HTML of the page, present if ScrapeFormats::HTML is present in ScrapeOptions.formats.
This contains HTML that has non-content tags removed. If you need the original HTML, use ScrapeFormats::RawHTML.
raw_html: Option<String>The raw HTML of the page, present if ScrapeFormats::RawHTML is present in ScrapeOptions.formats.
This contains the original, untouched HTML on the page. If you only need human-readable content, use ScrapeFormats::HTML.
screenshot: Option<String>The URL to the screenshot of the page, present if ScrapeFormats::Screenshot or ScrapeFormats::ScreenshotFullPage is present in ScrapeOptions.formats.
links: Option<Vec<String>>A list of the links on the page, present if ScrapeFormats::Links is present in ScrapeOptions.formats.
extract: Option<Value>The extracted data from the page, present if ScrapeFormats::Extract is present in ScrapeOptions.formats.
If ScrapeOptions.extract.schema is Some, this Value is guaranteed to match the provided schema.
json: Option<Value>The structured JSON data from the page, present if ScrapeFormats::JSON is present in ScrapeOptions.formats.
If ScrapeOptions.jsonOptions.schema is Some, this Value is guaranteed to match the provided schema.
actions: Option<ActionResults>Results of actions performed during scraping, present if actions parameter was provided in the request.
metadata: DocumentMetadataThe metadata from the page.
warning: Option<String>Can be present if ScrapeFormats::Extract is present in ScrapeOptions.formats.
The warning message will contain any errors encountered during the extraction.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
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>,
impl Eq for Document
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.