#[non_exhaustive]pub struct Options {
pub addr: SocketAddr,
pub reuse_address: bool,
pub reuse_port: ReusePort,
pub gro: bool,
pub blocking: bool,
pub delay: bool,
pub send_buffer: Option<usize>,
pub recv_buffer: Option<usize>,
pub backlog: usize,
pub only_v6: bool,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.addr: SocketAddr§reuse_address: bool§reuse_port: ReusePort§gro: bool§blocking: bool§delay: bool§send_buffer: Option<usize>§recv_buffer: Option<usize>§backlog: usize§only_v6: boolImplementations§
Source§impl Options
impl Options
pub fn new(addr: SocketAddr) -> Self
pub fn build_udp(&self) -> Result<UdpSocket>
pub fn build_tcp_listener(&self) -> Result<TcpListener>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)