#[non_exhaustive]pub enum ConfigReason {
}Expand description
The rule a configuration value broke.
use net_io::ConfigReason;
assert_eq!(ConfigReason::Zero.to_string(), "zero is not allowed here");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Zero
Zero where zero is meaningless.
TooLarge
Above the maximum.
TooSmall
Below the minimum.
AboveGlobal
A per-listener or per-source cap above the global cap.
BelowTick
A deadline shorter than one timer tick.
WindowBelowCheck
The minimum-rate window is shorter than its check interval.
BudgetBelowWorkers
The buffer budget is below workers times the largest class times two.
DescriptorLimit
The caps exceed the process’s descriptor limit.
Missing
A required part is not set.
NotListening
An adopted socket is not a listening socket.
Inconsistent
Values that contradict each other.
Malformed
A byte or character the value cannot contain (a NUL in a socket path).
InsecureDirectory
A Unix socket’s directory is writable by other users and has no sticky
bit, so anyone could rename or replace the socket file in it. Bind in a
directory only the service’s user (or root) can write to, or set the
sticky bit on it, as /tmp has.
use net_io::ConfigReason;
assert_eq!(
ConfigReason::InsecureDirectory.to_string(),
"the socket's directory is writable by other users and not sticky"
);