Struct walker_common::fetcher::Fetcher
source · pub struct Fetcher { /* private fields */ }Expand description
Fetch data using HTTP.
This is some functionality sitting on top an HTTP client, allowing for additional options like retries.
Implementations§
source§impl Fetcher
impl Fetcher
sourcepub async fn new(options: FetcherOptions) -> Result<Self>
pub async fn new(options: FetcherOptions) -> Result<Self>
Create a new downloader from options
sourcepub async fn fetch<D: Data>(&self, url: impl IntoUrl) -> Result<D, Error>
pub async fn fetch<D: Data>(&self, url: impl IntoUrl) -> Result<D, Error>
fetch data, using a GET request.
sourcepub async fn fetch_processed<D: DataProcessor>(
&self,
url: impl IntoUrl,
processor: D,
) -> Result<D::Type, Error>
pub async fn fetch_processed<D: DataProcessor>( &self, url: impl IntoUrl, processor: D, ) -> Result<D::Type, Error>
fetch data, using a GET request, processing the response data.
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)