Struct Builder

Source
pub struct Builder { /* private fields */ }
Expand description

Builder of HTTP/3 server connections.

Implementations§

Source§

impl Builder

Source

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.

Source

pub fn send_grease(&mut self, value: bool) -> &mut Self

Send grease values to the Client. See setting, frame and stream for more information.

Source

pub fn enable_webtransport(&mut self, value: bool) -> &mut Self

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.

Source

pub fn enable_extended_connect(&mut self, value: bool) -> &mut Self

Enables the extended CONNECT protocol required for various HTTP/3 extensions.

Source

pub fn max_webtransport_sessions(&mut self, value: u64) -> &mut Self

Limits the maximum number of WebTransport sessions

Source

pub fn enable_datagram(&mut self, value: bool) -> &mut Self

Indicates that the client or server supports HTTP/3 datagrams

See: https://www.rfc-editor.org/rfc/rfc9297#section-2.1.1

Source§

impl Builder

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.