pub struct GoClients { /* private fields */ }Expand description
Go standard-transport clients keyed by effective proxy, most recently used first.
Implementations§
Source§impl GoClients
impl GoClients
pub fn new(hooks: Hooks) -> Self
Sourcepub fn pool(
self,
max_idle_per_host: usize,
idle_timeout: Option<Duration>,
) -> Self
pub fn pool( self, max_idle_per_host: usize, idle_timeout: Option<Duration>, ) -> Self
Clients keeping at most max_idle_per_host idle connections per host (0 closes
each connection after its response), each for at most idle_timeout. Additive
(Antigravity’s connection pool settings).
Sourcepub fn http1_only(self) -> Self
pub fn http1_only(self) -> Self
Clients that speak only HTTP/1.1. Additive (Antigravity).
Sourcepub fn with_default(client: Client) -> Self
pub fn with_default(client: Client) -> Self
Every unproxied request uses client (local mock servers in tests).
Sourcepub fn timed(self) -> Self
pub fn timed(self) -> Self
Clients for an executor that times its requests (send_routed with a usage
sink): they report whether a request dialled its connection.
pub fn get(&self, proxy: &Proxy) -> Client
Auto Trait Implementations§
impl !Freeze for GoClients
impl !RefUnwindSafe for GoClients
impl !UnwindSafe for GoClients
impl Forget for GoClients
impl Move for GoClients
impl Send for GoClients
impl Sync for GoClients
impl Unpin for GoClients
impl UnsafeUnpin for GoClients
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more