pub struct HttpResourceHandler { /* private fields */ }Expand description
A client for HTTP resources.
Implementations§
source§impl HttpResourceHandler
impl HttpResourceHandler
sourcepub fn new(read_limit: u64, http_client: Client) -> Self
pub fn new(read_limit: u64, http_client: Client) -> Self
Create a new handler for HTTP resources.
read_limit is the maximum amount of bytes to read from a HTTP resource before failing,
and http_client is the underlying HTTP client.
sourcepub fn with_user_agent(read_limit: u64, user_agent: &str) -> Result<Self>
pub fn with_user_agent(read_limit: u64, user_agent: &str) -> Result<Self>
Create a new HTTP resource handler..
read_limit is the maximum amount of bytes to read from a HTTP resource, and and
user_agent is the string to use as user agent for all requests.
Create a HTTP client with some standard settings.
Trait Implementations§
source§impl Clone for HttpResourceHandler
impl Clone for HttpResourceHandler
source§fn clone(&self) -> HttpResourceHandler
fn clone(&self) -> HttpResourceHandler
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for HttpResourceHandler
impl Debug for HttpResourceHandler
Auto Trait Implementations§
impl Freeze for HttpResourceHandler
impl !RefUnwindSafe for HttpResourceHandler
impl Send for HttpResourceHandler
impl Sync for HttpResourceHandler
impl Unpin for HttpResourceHandler
impl !UnwindSafe for HttpResourceHandler
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)