Struct wtransport::endpoint::ConnectOptions
source · pub struct ConnectOptions { /* private fields */ }
Expand description
Options for establishing a client WebTransport connection.
Used in Endpoint::connect
.
§Examples
let options = ConnectOptions::builder("https://example.com:4433/webtransport")
.add_header("Authorization", "AuthToken")
.build();
let connection = endpoint.connect(options).await?;
Implementations§
source§impl ConnectOptions
impl ConnectOptions
sourcepub fn builder<S>(url: S) -> ConnectRequestBuilderwhere
S: ToString,
pub fn builder<S>(url: S) -> ConnectRequestBuilderwhere
S: ToString,
Creates a new ConnectOptions
using a builder pattern.
§Arguments
url
- A URL string representing the WebTransport endpoint to connect to. It must have anhttps
scheme. The URL can specify either an IP address or a hostname. When specifying a hostname, the method will internally perform DNS resolution, configured withClientConfigBuilder::dns_resolver
.
Trait Implementations§
source§impl IntoConnectOptions for ConnectOptions
impl IntoConnectOptions for ConnectOptions
source§fn into_options(self) -> ConnectOptions
fn into_options(self) -> ConnectOptions
Perform value-to-value conversion into
ConnectOptions
.Auto Trait Implementations§
impl Freeze for ConnectOptions
impl RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl UnwindSafe for ConnectOptions
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