pub struct ExtractionConfig {
pub body: Vec<u8>,
pub content_type: String,
pub url: Option<String>,
pub charset: Option<String>,
pub extraction_template: Option<String>,
pub extraction_ephemeral_template: Option<Value>,
pub extraction_prompt: Option<String>,
pub extraction_model: Option<ExtractionModel>,
pub is_document_compressed: bool,
pub document_compression_format: Option<CompressionFormat>,
pub webhook: Option<String>,
pub timeout: Option<u32>,
}Expand description
Configuration for a POST /extraction request.
Fields§
§body: Vec<u8>Document bytes (required).
content_type: StringContent type, e.g. text/html (required).
url: Option<String>Original URL (helps the AI with context).
charset: Option<String>Character set.
extraction_template: Option<String>Saved extraction template name.
extraction_ephemeral_template: Option<Value>Inline (ephemeral) template.
extraction_prompt: Option<String>AI extraction prompt.
extraction_model: Option<ExtractionModel>Extraction model.
is_document_compressed: boolBody is compressed.
document_compression_format: Option<CompressionFormat>Compression format.
webhook: Option<String>Webhook name.
timeout: Option<u32>Maximum time in seconds for extraction processing.
Implementations§
Source§impl ExtractionConfig
impl ExtractionConfig
Sourcepub fn builder(
body: Vec<u8>,
content_type: impl Into<String>,
) -> ExtractionConfigBuilder
pub fn builder( body: Vec<u8>, content_type: impl Into<String>, ) -> ExtractionConfigBuilder
Start a builder.
Sourcepub fn to_query_pairs(&self) -> Result<Vec<(String, String)>, ScrapflyError>
pub fn to_query_pairs(&self) -> Result<Vec<(String, String)>, ScrapflyError>
Query params (key is added separately by the client).
Trait Implementations§
Source§impl Clone for ExtractionConfig
impl Clone for ExtractionConfig
Source§fn clone(&self) -> ExtractionConfig
fn clone(&self) -> ExtractionConfig
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 ExtractionConfig
impl Debug for ExtractionConfig
Source§impl Default for ExtractionConfig
impl Default for ExtractionConfig
Source§fn default() -> ExtractionConfig
fn default() -> ExtractionConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExtractionConfig
impl RefUnwindSafe for ExtractionConfig
impl Send for ExtractionConfig
impl Sync for ExtractionConfig
impl Unpin for ExtractionConfig
impl UnsafeUnpin for ExtractionConfig
impl UnwindSafe for ExtractionConfig
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