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
Options for configuring the transport.
See https://developer.mozilla.org/en-US/docs/Web/API/WebTransport/WebTransport#options.
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
impl WebTransportOptions
sourcepub fn to_js(&self) -> WebTransportOptions
pub fn to_js(&self) -> WebTransportOptions
Creates a JavaScript value from this value.
Trait Implementations§
source§impl Clone for WebTransportOptions
impl Clone for WebTransportOptions
source§fn clone(&self) -> WebTransportOptions
fn clone(&self) -> WebTransportOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WebTransportOptions
impl Debug for WebTransportOptions
source§impl Default for WebTransportOptions
impl Default for WebTransportOptions
source§fn default() -> WebTransportOptions
fn default() -> WebTransportOptions
source§impl PartialEq for WebTransportOptions
impl PartialEq for WebTransportOptions
source§fn eq(&self, other: &WebTransportOptions) -> bool
fn eq(&self, other: &WebTransportOptions) -> bool
self
and other
values to be equal, and is used
by ==
.