pub struct TcpOptsSupport {
pub nodelay: bool,
pub keepalive: bool,
pub keepalive_interval: bool,
pub keepalive_retries: bool,
pub bind_device: bool,
pub user_timeout: bool,
pub local_address: bool,
pub send_buffer_size: bool,
pub recv_buffer_size: bool,
pub reuse_address: bool,
}Expand description
Which of TcpOpts’ six fields a runtime can actually apply.
One bool per field of TcpOpts, not a count and not a bitflags crate:
the error a caller gets has to name the option it asked for, and a
field-per-field mirror is the only shape that can.
Fields§
§nodelay: bool§keepalive: bool§keepalive_interval: bool§keepalive_retries: bool§bind_device: boolSO_BINDTODEVICE, which exists on Linux, Android and Fuchsia and
nowhere else — so a runtime that sets this must decide it per
target rather than in one constant. TcpOptsSupport::ALL is still
literally every field, and is therefore no longer a value any real
runtime can claim on every platform it builds for.
user_timeout: boolTCP_USER_TIMEOUT, Linux/Android/Fuchsia/Cygwin — the same
per-target rule as bind_device.
local_address: bool§send_buffer_size: bool§recv_buffer_size: bool§reuse_address: boolImplementations§
Source§impl TcpOptsSupport
impl TcpOptsSupport
Sourcepub const ALL: Self
pub const ALL: Self
Everything applied — what a runtime that hands the whole set to a
socket2::Socket says. Both shipped runtimes do exactly that.
Sourcepub const NONE: Self
pub const NONE: Self
Nothing applied — the default for TcpConnect::APPLIES, and the
conservative base a runtime turns individual fields on from.
Trait Implementations§
Source§impl Clone for TcpOptsSupport
impl Clone for TcpOptsSupport
Source§fn clone(&self) -> TcpOptsSupport
fn clone(&self) -> TcpOptsSupport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more