Struct hyper_timeout::TimeoutConnector
source · pub struct TimeoutConnector<T> { /* private fields */ }
Expand description
A connector that enforces a connection timeout
Implementations§
source§impl<T> TimeoutConnector<T>
impl<T> TimeoutConnector<T>
source§impl<T> TimeoutConnector<T>
impl<T> TimeoutConnector<T>
sourcepub fn set_connect_timeout(&mut self, val: Option<Duration>)
pub fn set_connect_timeout(&mut self, val: Option<Duration>)
Set the timeout for connecting to a URL.
Default is no timeout.
sourcepub fn set_read_timeout(&mut self, val: Option<Duration>)
pub fn set_read_timeout(&mut self, val: Option<Duration>)
Set the timeout for the response.
Default is no timeout.
sourcepub fn set_write_timeout(&mut self, val: Option<Duration>)
pub fn set_write_timeout(&mut self, val: Option<Duration>)
Set the timeout for the request.
Default is no timeout.
Trait Implementations§
source§impl<T: Clone> Clone for TimeoutConnector<T>
impl<T: Clone> Clone for TimeoutConnector<T>
source§fn clone(&self) -> TimeoutConnector<T>
fn clone(&self) -> TimeoutConnector<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T> Connection for TimeoutConnector<T>
impl<T> Connection for TimeoutConnector<T>
source§impl<T: Debug> Debug for TimeoutConnector<T>
impl<T: Debug> Debug for TimeoutConnector<T>
source§impl<T> Service<Uri> for TimeoutConnector<T>
impl<T> Service<Uri> for TimeoutConnector<T>
§type Response = Pin<Box<TimeoutStream<<T as Service<Uri>>::Response>>>
type Response = Pin<Box<TimeoutStream<<T as Service<Uri>>::Response>>>
Responses given by the service.
§type Future = Pin<Box<dyn Future<Output = Result<<TimeoutConnector<T> as Service<Uri>>::Response, <TimeoutConnector<T> as Service<Uri>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<TimeoutConnector<T> as Service<Uri>>::Response, <TimeoutConnector<T> as Service<Uri>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl<T> Freeze for TimeoutConnector<T>where
T: Freeze,
impl<T> RefUnwindSafe for TimeoutConnector<T>where
T: RefUnwindSafe,
impl<T> Send for TimeoutConnector<T>where
T: Send,
impl<T> Sync for TimeoutConnector<T>where
T: Sync,
impl<T> Unpin for TimeoutConnector<T>where
T: Unpin,
impl<T> UnwindSafe for TimeoutConnector<T>where
T: UnwindSafe,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)