pub struct PooledConn<T> {
pub sender: T,
pub abort: AbortHandle,
pub last_seen: Instant,
}Expand description
Represents a connection to a remote HTTP server that can be reused across multiple requests. Includes the actual sender for making requests, a handle to abort the connection task, and a timestamp for tracking when the connection was last used for connection pooling.
Fields§
§sender: TThe HTTP sender for making requests
abort: AbortHandleHandle to abort the connection task when no longer needed
last_seen: InstantTimestamp of when this connection was last used
Implementations§
Source§impl<T> PooledConn<T>
impl<T> PooledConn<T>
Sourcepub fn new(sender: T, abort: AbortHandle) -> Self
pub fn new(sender: T, abort: AbortHandle) -> Self
Creates a new pooled connection.
§Arguments
sender- The HTTP sender for making requestsabort- Handle to abort the connection task when no longer needed
Trait Implementations§
Source§impl<T: Clone> Clone for PooledConn<T>
impl<T: Clone> Clone for PooledConn<T>
Source§fn clone(&self) -> PooledConn<T>
fn clone(&self) -> PooledConn<T>
Returns a duplicate 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: Debug> Debug for PooledConn<T>
impl<T: Debug> Debug for PooledConn<T>
Source§impl<T> Deref for PooledConn<T>
impl<T> Deref for PooledConn<T>
Source§impl<T> DerefMut for PooledConn<T>
impl<T> DerefMut for PooledConn<T>
Source§impl<T> Drop for PooledConn<T>
impl<T> Drop for PooledConn<T>
Source§impl<T: PartialEq> PartialEq for PooledConn<T>
impl<T: PartialEq> PartialEq for PooledConn<T>
Auto Trait Implementations§
impl<T> Freeze for PooledConn<T>where
T: Freeze,
impl<T> RefUnwindSafe for PooledConn<T>where
T: RefUnwindSafe,
impl<T> Send for PooledConn<T>where
T: Send,
impl<T> Sync for PooledConn<T>where
T: Sync,
impl<T> Unpin for PooledConn<T>where
T: Unpin,
impl<T> UnwindSafe for PooledConn<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