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 anhttpsscheme. 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.
Sourcepub fn additional_headers(&self) -> &HashMap<String, String>
pub fn additional_headers(&self) -> &HashMap<String, String>
Gets the additional headers that will be passed when connecting.
Trait Implementations§
Source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectOptions
impl Debug for ConnectOptions
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