pub struct ForwardClient { /* private fields */ }Expand description
The HTTP client a forwarder’s hops go through.
A newtype rather than a re-exported reqwest::Client, because the CLI is forbidden from
naming reqwest at all (crates/microvms-cli/tests/thinness.rs) — so a caller there cannot build
one, and handing back the foreign type would only move the compile error. Pooled for the
whole tunnel: a page-load of thirty assets should not pay thirty TLS handshakes.
Implementations§
Source§impl ForwardClient
impl ForwardClient
Sourcepub fn new() -> Result<ForwardClient, Error>
pub fn new() -> Result<ForwardClient, Error>
A pooled client for one tunnel.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ForwardClient
impl !UnwindSafe for ForwardClient
impl Freeze for ForwardClient
impl Send for ForwardClient
impl Sync for ForwardClient
impl Unpin for ForwardClient
impl UnsafeUnpin for ForwardClient
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> 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 moreCreates a shared type from an unshared type.