pub struct H3Client { /* private fields */ }Expand description
An H3 client session sharing one QUIC connection across concurrent requests.
Implementations§
Source§impl H3Client
impl H3Client
pub fn new( quic: Arc<QuicClient>, authorization: Option<(String, String)>, ) -> Self
Sourcepub async fn connect(&self, target: &TargetAddr) -> Result<BoxStream, H3Error>
pub async fn connect(&self, target: &TargetAddr) -> Result<BoxStream, H3Error>
Open a multiplexed HTTP/3 CONNECT stream.
On transport-level failure the cached session and QUIC connection are dropped and the request is retried once, mirroring the QUIC client’s reconnect-on-error recovery path. Without this, a session cached over a connection killed by an idle timeout or GOAWAY would fail forever.
pub async fn close(&self)
Auto Trait Implementations§
impl !Freeze for H3Client
impl !RefUnwindSafe for H3Client
impl !UnwindSafe for H3Client
impl Send for H3Client
impl Sync for H3Client
impl Unpin for H3Client
impl UnsafeUnpin for H3Client
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