feat(rust): update rust sdk to support new features (#1446)

* chore(rust-sdk): cargo fmt

* feat(rust-sdk): implement search api + example + test

* feat(rust-sdk): implement crawl cancel api + example + test

* feat(rust-sdk): implement crawl check errors api + example + test

* feat(rust-sdk): implement batch crawl + test + example

+ Fix MapOptions

* feat(rust-sdk): implement extract api + test + example

* feat(rust-sdk): implement llmtxt api + test + example

* chore(rust-sdk): correct mock tests

* chore(rust-sdk): prep for cargo distribution
This commit is contained in:
kkharji
2025-04-18 07:59:59 +03:00
committed by GitHub
parent 33aece8e96
commit f2c01340d1
20 changed files with 4350 additions and 125 deletions
+4 -2
View File
@@ -16,7 +16,7 @@ pub struct MapOptions {
pub include_subdomains: Option<bool>,
/// Maximum number of links to return (default: `5000`)
pub exclude_tags: Option<u32>,
pub limit: Option<u32>,
}
#[derive(Deserialize, Serialize, Debug, Default)]
@@ -59,7 +59,9 @@ impl FirecrawlApp {
.await
.map_err(|e| FirecrawlError::HttpError(format!("Mapping {:?}", url.as_ref()), e))?;
let response = self.handle_response::<MapResponse>(response, "scrape URL").await?;
let response = self
.handle_response::<MapResponse>(response, "scrape URL")
.await?;
Ok(response.links)
}