pub struct NativeTransportOptions { /* private fields */ }Expand description
TLS, proxy, header, and WebSocket limit settings for native transports.
Implementations§
Source§impl NativeTransportOptions
impl NativeTransportOptions
Sourcepub fn header(self, name: impl Into<String>, value: impl Into<String>) -> Self
pub fn header(self, name: impl Into<String>, value: impl Into<String>) -> Self
Adds an HTTP header to the WebSocket upgrade request.
Sourcepub fn tls_config(self, config: Arc<ClientConfig>) -> Self
pub fn tls_config(self, config: Arc<ClientConfig>) -> Self
Uses an application-provided Rustls client configuration.
Sourcepub fn proxy(self, proxy: ProxyConfig) -> Self
pub fn proxy(self, proxy: ProxyConfig) -> Self
Routes applicable connections through an HTTP CONNECT proxy.
Sourcepub fn max_message_size(self, value: Option<usize>) -> Self
pub fn max_message_size(self, value: Option<usize>) -> Self
Sets the maximum accepted WebSocket message size, or disables it.
Sourcepub fn max_frame_size(self, value: Option<usize>) -> Self
pub fn max_frame_size(self, value: Option<usize>) -> Self
Sets the maximum accepted WebSocket frame size, or disables it.
Sourcepub fn disable_nagle(self, value: bool) -> Self
pub fn disable_nagle(self, value: bool) -> Self
Enables or disables TCP nodelay on direct and proxied connections.
Trait Implementations§
Source§impl Clone for NativeTransportOptions
impl Clone for NativeTransportOptions
Source§fn clone(&self) -> NativeTransportOptions
fn clone(&self) -> NativeTransportOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NativeTransportOptions
impl Debug for NativeTransportOptions
Auto Trait Implementations§
impl Freeze for NativeTransportOptions
impl !RefUnwindSafe for NativeTransportOptions
impl Send for NativeTransportOptions
impl Sync for NativeTransportOptions
impl Unpin for NativeTransportOptions
impl UnsafeUnpin for NativeTransportOptions
impl !UnwindSafe for NativeTransportOptions
Blanket Implementations§
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