pub struct Builder { /* private fields */ }Available on crate feature
h3 only.Expand description
Builder of HTTP/3 server connections.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn max_field_section_size(&mut self, value: u64) -> &mut Builder
pub fn max_field_section_size(&mut self, value: u64) -> &mut Builder
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, value: bool) -> &mut Builder
pub fn send_grease(&mut self, value: bool) -> &mut Builder
Sourcepub fn enable_webtransport(&mut self, value: bool) -> &mut Builder
pub fn enable_webtransport(&mut self, value: bool) -> &mut Builder
Indicates to the peer that WebTransport is supported.
See: establishing a webtransport session
Server:
Supporting for webtransport also requires setting enable_extended_connect enable_datagram
and max_webtransport_sessions.
Sourcepub fn enable_extended_connect(&mut self, value: bool) -> &mut Builder
pub fn enable_extended_connect(&mut self, value: bool) -> &mut Builder
Enables the extended CONNECT protocol required for various HTTP/3 extensions.
Sourcepub fn max_webtransport_sessions(&mut self, value: u64) -> &mut Builder
pub fn max_webtransport_sessions(&mut self, value: u64) -> &mut Builder
Limits the maximum number of WebTransport sessions
Sourcepub fn enable_datagram(&mut self, value: bool) -> &mut Builder
pub fn enable_datagram(&mut self, value: bool) -> &mut Builder
Indicates that the client or server supports HTTP/3 datagrams
Source§impl Builder
impl Builder
Sourcepub async fn build<C, B>(
&self,
conn: C,
) -> Result<Connection<C, B>, ConnectionError>where
C: Connection<B>,
B: Buf,
pub async fn build<C, B>(
&self,
conn: C,
) -> Result<Connection<C, B>, ConnectionError>where
C: Connection<B>,
B: Buf,
Build an HTTP/3 connection from a QUIC connection
This method creates a Connection instance with the settings in the Builder.
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
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