pub struct NetworkOptions { /* private fields */ }
Expand description
Provides a way to configure low level network connection configurations
Implementations§
Source§impl NetworkOptions
impl NetworkOptions
pub fn new() -> Self
pub fn set_tcp_send_buffer_size(&mut self, size: u32)
pub fn set_tcp_recv_buffer_size(&mut self, size: u32)
Sourcepub fn set_connection_timeout(&mut self, timeout: u64) -> &mut Self
pub fn set_connection_timeout(&mut self, timeout: u64) -> &mut Self
set connection timeout in secs
Sourcepub fn connection_timeout(&self) -> u64
pub fn connection_timeout(&self) -> u64
get timeout in secs
Sourcepub fn set_bind_device(&mut self, bind_device: &str) -> &mut Self
Available on Android or Fuchsia or Linux only.
pub fn set_bind_device(&mut self, bind_device: &str) -> &mut Self
bind connection to a specific network device by name
Trait Implementations§
Source§impl Clone for NetworkOptions
impl Clone for NetworkOptions
Source§fn clone(&self) -> NetworkOptions
fn clone(&self) -> NetworkOptions
Returns a copy 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 Default for NetworkOptions
impl Default for NetworkOptions
Source§fn default() -> NetworkOptions
fn default() -> NetworkOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NetworkOptions
impl RefUnwindSafe for NetworkOptions
impl Send for NetworkOptions
impl Sync for NetworkOptions
impl Unpin for NetworkOptions
impl UnwindSafe for NetworkOptions
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