pub struct H1Connector<C, K, IO>where
IO: AsyncWriteRent,{
pub read_timeout: Option<Duration>,
/* private fields */
}
Expand description
This struct is retained for backwards compatibility.
It is recommended to use the unified HttpConnector
instead.
Fields§
§read_timeout: Option<Duration>
Implementations§
Source§impl<C, K, IO> H1Connector<C, K, IO>where
IO: AsyncWriteRent,
impl<C, K, IO> H1Connector<C, K, IO>where
IO: AsyncWriteRent,
pub const fn new(inner_connector: C) -> H1Connector<C, K, IO>
pub const fn new_with_timeout( inner_connector: C, timeout: Duration, ) -> H1Connector<C, K, IO>
pub fn pool(&mut self) -> &mut Option<ConnectionPool<K, Http1Connection<IO>>>
pub fn read_timeout(&mut self) -> &mut Option<Duration>
Source§impl<C, K, IO> H1Connector<C, K, IO>where
K: 'static,
IO: AsyncWriteRent + 'static,
impl<C, K, IO> H1Connector<C, K, IO>where
K: 'static,
IO: AsyncWriteRent + 'static,
pub fn with_default_pool(self) -> H1Connector<C, K, IO>
Trait Implementations§
Source§impl<C, K, IO> Clone for H1Connector<C, K, IO>where
C: Clone,
IO: AsyncWriteRent,
impl<C, K, IO> Clone for H1Connector<C, K, IO>where
C: Clone,
IO: AsyncWriteRent,
Source§fn clone(&self) -> H1Connector<C, K, IO>
fn clone(&self) -> H1Connector<C, K, IO>
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<C, K, IO> Connector<K> for H1Connector<C, K, IO>
impl<C, K, IO> Connector<K> for H1Connector<C, K, IO>
type Connection = Pooled<K, Http1Connection<IO>>
type Error = <C as Connector<K>>::Error
Source§async fn connect(
&self,
key: K,
) -> Result<<H1Connector<C, K, IO> as Connector<K>>::Connection, <H1Connector<C, K, IO> as Connector<K>>::Error>
async fn connect( &self, key: K, ) -> Result<<H1Connector<C, K, IO> as Connector<K>>::Connection, <H1Connector<C, K, IO> as Connector<K>>::Error>
Attempts to establish a connection. Read more
Source§impl<C, K, IO> Default for H1Connector<C, K, IO>where
C: Default,
IO: AsyncWriteRent,
impl<C, K, IO> Default for H1Connector<C, K, IO>where
C: Default,
IO: AsyncWriteRent,
Source§fn default() -> H1Connector<C, K, IO>
fn default() -> H1Connector<C, K, IO>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<C, K, IO> Freeze for H1Connector<C, K, IO>where
C: Freeze,
impl<C, K, IO> !RefUnwindSafe for H1Connector<C, K, IO>
impl<C, K, IO> !Send for H1Connector<C, K, IO>
impl<C, K, IO> !Sync for H1Connector<C, K, IO>
impl<C, K, IO> Unpin for H1Connector<C, K, IO>where
C: Unpin,
impl<C, K, IO> !UnwindSafe for H1Connector<C, K, IO>
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