Enum hyper::client::pool::Reservation
source · pub(super) enum Reservation<T> {
Shared(T, T),
Unique(T),
}
Expand description
When checking out a pooled connection, it might be that the connection only supports a single reservation, or it might be usable for many.
Specifically, HTTP/1 requires a unique reservation, but HTTP/2 can be used for multiple requests.
Variants§
This connection could be used multiple times, the first one will be
reinserted into the idle
pool, and the second will be given to
the Checkout
.
Unique(T)
This connection requires unique access. It will be returned after use is complete.
Auto Trait Implementations§
impl<T> Freeze for Reservation<T>where
T: Freeze,
impl<T> RefUnwindSafe for Reservation<T>where
T: RefUnwindSafe,
impl<T> Send for Reservation<T>where
T: Send,
impl<T> Sync for Reservation<T>where
T: Sync,
impl<T> Unpin for Reservation<T>where
T: Unpin,
impl<T> UnwindSafe for Reservation<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