pub struct FirecrawlClientBuilder { /* private fields */ }Expand description
FirecrawlClient 构建器
Implementations§
Source§impl FirecrawlClientBuilder
impl FirecrawlClientBuilder
Sourcepub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
设置客户端名称(用于日志和 CompositeFetcher 识别,默认 “firecrawl”)
Sourcepub fn with_tokens(self, tokens: &[impl Into<String> + Clone]) -> Self
pub fn with_tokens(self, tokens: &[impl Into<String> + Clone]) -> Self
设置 API token 列表(每次请求随机选择一个)
Sourcepub fn with_tokens_from_env(self, env_var: &str) -> Self
pub fn with_tokens_from_env(self, env_var: &str) -> Self
从环境变量读取 token(逗号分隔多个)
Sourcepub fn with_max_retries(self, max_retries: usize) -> Self
pub fn with_max_retries(self, max_retries: usize) -> Self
设置最大重试次数(默认 3)
Sourcepub fn build(self) -> Result<FirecrawlClient>
pub fn build(self) -> Result<FirecrawlClient>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FirecrawlClientBuilder
impl RefUnwindSafe for FirecrawlClientBuilder
impl Send for FirecrawlClientBuilder
impl Sync for FirecrawlClientBuilder
impl Unpin for FirecrawlClientBuilder
impl UnsafeUnpin for FirecrawlClientBuilder
impl UnwindSafe for FirecrawlClientBuilder
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