pub struct FallbackRenderer { /* private fields */ }Expand description
Composite renderer that tries multiple backends in order.
Implementations§
Source§impl FallbackRenderer
impl FallbackRenderer
pub fn new( config: &RendererConfig, user_agent: &str, proxy: Option<&str>, stealth: &StealthConfig, ) -> Self
Sourcepub async fn fetch(
&self,
url: &str,
headers: &HashMap<String, String>,
render_js: Option<bool>,
wait_for_ms: Option<u64>,
) -> CrwResult<FetchResult>
pub async fn fetch( &self, url: &str, headers: &HashMap<String, String>, render_js: Option<bool>, wait_for_ms: Option<u64>, ) -> CrwResult<FetchResult>
Fetch a URL with smart mode: HTTP first, then JS if needed.
When render_js is None (auto-detect), the renderer also escalates to
JS rendering if the HTTP response looks like an anti-bot challenge page
(Cloudflare “Just a moment…”, etc.). The CDP renderer has built-in
challenge retry logic that waits for non-interactive JS challenges to
auto-resolve.
Sourcepub async fn check_health(&self) -> HashMap<String, bool>
pub async fn check_health(&self) -> HashMap<String, bool>
Check availability of all renderers.
Auto Trait Implementations§
impl Freeze for FallbackRenderer
impl !RefUnwindSafe for FallbackRenderer
impl Send for FallbackRenderer
impl Sync for FallbackRenderer
impl Unpin for FallbackRenderer
impl UnsafeUnpin for FallbackRenderer
impl !UnwindSafe for FallbackRenderer
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