Struct salvo_core::conn::quinn::Builder
source · pub struct Builder(/* private fields */);
Available on crate feature
quinn
only.Expand description
Builder is used to serve HTTP3 connection.
Implementations§
source§impl Builder
impl Builder
sourcepub async fn serve_connection(
&self,
conn: H3Connection,
hyper_handler: HyperHandler,
graceful_stop_token: CancellationToken
) -> IoResult<()>
pub async fn serve_connection( &self, conn: H3Connection, hyper_handler: HyperHandler, graceful_stop_token: CancellationToken ) -> IoResult<()>
Serve HTTP3 connection.
Methods from Deref<Target = 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_connect
enable_datagram
and max_webtransport_sessions
.
sourcepub fn enable_connect(&mut self, value: bool) -> &mut Builder
pub fn enable_connect(&mut self, value: bool) -> &mut Builder
Enables the CONNECT protocol
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
sourcepub async fn build<C, B>(&self, conn: C) -> Result<Connection<C, B>, Error>where
C: Connection<B>,
B: Buf,
pub async fn build<C, B>(&self, conn: C) -> Result<Connection<C, B>, Error>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
.
Trait Implementations§
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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