pub struct SocketOptions {
pub send_buffer_size: Option<usize>,
pub recv_buffer_size: Option<usize>,
pub reuse_address: bool,
pub reuse_port: bool,
}
Expand description
Socket-level options for endpoint binding
Fields§
§send_buffer_size: Option<usize>
Send buffer size in bytes
recv_buffer_size: Option<usize>
Receive buffer size in bytes
reuse_address: bool
Enable SO_REUSEADDR
reuse_port: bool
Enable SO_REUSEPORT (Linux/BSD only)
Trait Implementations§
Source§impl Clone for SocketOptions
impl Clone for SocketOptions
Source§fn clone(&self) -> SocketOptions
fn clone(&self) -> SocketOptions
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 SocketOptions
impl Debug for SocketOptions
Source§impl Default for SocketOptions
impl Default for SocketOptions
Source§fn default() -> SocketOptions
fn default() -> SocketOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for SocketOptions
impl PartialEq for SocketOptions
impl Eq for SocketOptions
impl StructuralPartialEq for SocketOptions
Auto Trait Implementations§
impl Freeze for SocketOptions
impl RefUnwindSafe for SocketOptions
impl Send for SocketOptions
impl Sync for SocketOptions
impl Unpin for SocketOptions
impl UnwindSafe for SocketOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.