pub struct Builder { /* private fields */ }Expand description
HTTP/3 client builder
Set the configuration for a new client.
§Examples
let h3_conn = h3::client::builder()
.max_field_section_size(8192)
.build(quic)
.await
.expect("Failed to build connection");Implementations§
Source§impl Builder
impl Builder
Sourcepub fn max_field_section_size(&mut self, value: u64) -> &mut Self
pub fn max_field_section_size(&mut self, value: u64) -> &mut Self
Set the maximum header size this client is willing to accept
See header size constraints section of the specification for details.
Sourcepub fn send_grease(&mut self, enabled: bool) -> &mut Self
pub fn send_grease(&mut self, enabled: bool) -> &mut Self
Just like in HTTP/2, HTTP/3 also uses the concept of “grease” to prevent potential interoperability issues in the future. In HTTP/3, the concept of grease is used to ensure that the protocol can evolve and accommodate future changes without breaking existing implementations.
Sourcepub fn enable_datagram(&mut self, enabled: bool) -> &mut Self
pub fn enable_datagram(&mut self, enabled: bool) -> &mut Self
Indicates that the client supports HTTP/3 datagrams
Sourcepub fn enable_extended_connect(&mut self, value: bool) -> &mut Self
pub fn enable_extended_connect(&mut self, value: bool) -> &mut Self
Enables the extended CONNECT protocol required for various HTTP/3 extensions.
Sourcepub async fn build<C, O, B>( &mut self, quic: C, ) -> Result<(Connection<C, B>, SendRequest<O, B>), ConnectionError>where C: Connection<B, OpenStreams = O>, O: OpenStreams<B>, B: Buf,
pub async fn build<C, O, B>( &mut self, quic: C, ) -> Result<(Connection<C, B>, SendRequest<O, B>), ConnectionError>where C: Connection<B, OpenStreams = O>, O: OpenStreams<B>, B: Buf,
Create a new HTTP/3 client from a quic connection
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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