pub struct Fetcher { /* private fields */ }Implementations§
Source§impl Fetcher
impl Fetcher
pub fn new() -> Self
pub fn with_config(config: FetcherConfig) -> Self
pub fn new_with_custom_config(timeout: Duration, user_agent: &str) -> Self
pub fn with_client(client: Client) -> Self
pub async fn fetch_batch( &self, urls: Vec<&str>, ) -> Result<Vec<FetchResult>, PreviewError>
pub async fn fetch_with_backoff( &self, url: &str, ) -> Result<String, PreviewError>
pub async fn fetch(&self, url: &str) -> Result<FetchResult, PreviewError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fetcher
impl !RefUnwindSafe for Fetcher
impl Send for Fetcher
impl Sync for Fetcher
impl Unpin for Fetcher
impl !UnwindSafe for Fetcher
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