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 async fn build<C, O, B>(
&mut self,
quic: C
) -> Result<(Connection<C, B>, SendRequest<O, B>), Error>
pub async fn build<C, O, B>( &mut self, quic: C ) -> Result<(Connection<C, B>, SendRequest<O, B>), Error>
Create a new HTTP/3 client from a quic
connection
Auto Trait Implementations§
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