Struct xwt_web_sys::WebTransportOptions

source ·
pub struct WebTransportOptions {
    pub allow_pooling: bool,
    pub congestion_control: CongestionControl,
    pub require_unreliable: bool,
    pub server_certificate_hashes: Vec<CertificateHash>,
}
Expand description

Fields§

§allow_pooling: bool

If true, the network connection for this WebTransport can be shared with a pool of other HTTP/3 sessions.

By default the value is false, and the connection cannot be shared.

§congestion_control: CongestionControl

Indicates the application’s preference that the congestion control algorithm used when sending data over this connection be tuned for either throughput or low-latency.

This is a hint to the user agent.

§require_unreliable: bool

If true, the connection cannot be established over HTTP/2 if an HTTP/3 connection is not possible.

By default the value is false.

§server_certificate_hashes: Vec<CertificateHash>

An array of objects, each defining the hash value of a server certificate along with the name of the algorithm that was used to generate it.

This option is only supported for transports using dedicated connections (allow_pooling is false).

If specified, the browser will attempt to authenticate the certificate provided by the server against the provided certificate hash(es) in order to connect, instead of using the Web public key infrastructure (PKI). If any hashes match, the browser knows that the server has possession of a trusted certificate and will connect as normal. If empty the user agent uses the same PKI certificate verification procedures it would use for a normal fetch operation.

This feature allows developers to connect to WebTransport servers that would normally find obtaining a publicly trusted certificate challenging, such as hosts that are not publicly routable, or ephemeral hosts like virtual machines.

Implementations§

source§

impl WebTransportOptions

source

pub fn to_js(&self) -> WebTransportOptions

Creates a JavaScript value from this value.

Trait Implementations§

source§

impl Clone for WebTransportOptions

source§

fn clone(&self) -> WebTransportOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WebTransportOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for WebTransportOptions

source§

fn default() -> WebTransportOptions

Returns the “default value” for a type. Read more
source§

impl PartialEq for WebTransportOptions

source§

fn eq(&self, other: &WebTransportOptions) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for WebTransportOptions

source§

impl StructuralPartialEq for WebTransportOptions

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.
source§

impl<T> Send for T

source§

impl<T> Sync for T