pub struct RequestContext(/* private fields */);Implementations§
Source§impl RequestContext
impl RequestContext
Sourcepub fn get_timeout(&self) -> Option<Duration>
pub fn get_timeout(&self) -> Option<Duration>
Get request timeout
Sourcepub fn timeout<U>(&mut self, timeout: U) -> &mut Self
pub fn timeout<U>(&mut self, timeout: U) -> &mut Self
Set the max duration the request is allowed to take.
The duration will be formatted according to the spec and use the most precise possible.
Sourcepub fn disconnect_on_drop(&mut self) -> &mut Self
pub fn disconnect_on_drop(&mut self) -> &mut Self
Disconnect connection on request drop
Sourcepub fn header<K, V>(&mut self, key: K, value: V) -> &mut Selfwhere
HeaderName: TryFrom<K>,
HeaderValue: TryFrom<V>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
<HeaderValue as TryFrom<V>>::Error: Into<HttpError>,
pub fn header<K, V>(&mut self, key: K, value: V) -> &mut Selfwhere
HeaderName: TryFrom<K>,
HeaderValue: TryFrom<V>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
<HeaderValue as TryFrom<V>>::Error: Into<HttpError>,
Append a header to existing headers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RequestContext
impl !RefUnwindSafe for RequestContext
impl !Send for RequestContext
impl !Sync for RequestContext
impl Unpin for RequestContext
impl UnsafeUnpin for RequestContext
impl !UnwindSafe for RequestContext
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