#[non_exhaustive]pub enum Fault {
Error {
errno: i32,
call: &'static str,
},
ConnectRefused,
ConnectTimedOut,
ConnectDelayed {
until: Duration,
},
IcmpPortUnreachable {
from: SocketAddr,
},
Stalled {
span: Duration,
direction: Direction,
},
LinkDown {
nic: String,
},
Unreachable {
errno: i32,
},
Dns {
name: String,
failure: DnsFailure,
},
}Expand description
A fault injected into the code under test, as it took effect.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Error
A call failed with errno (a WSA code on Windows), as the host OS reports it.
ConnectRefused
A connect was refused by a listener set to refuse (see
set_listener_behavior).
ConnectTimedOut
A connect gave up with ETIMEDOUT (WSAETIMEDOUT).
ConnectDelayed
A connect held until until on the sim’s clock.
IcmpPortUnreachable
An ICMP port unreachable from from reached a datagram socket of the code under test.
Fields
from: SocketAddrStalled
Traffic at the address was held for span (see quiesce).
LinkDown
A frame was dropped because the interface nic it left by had no usable link.
Unreachable
A call failed because the address could not be reached: ENETUNREACH, EHOSTUNREACH or
ENETDOWN from routing, or a connect that failed with an errno other than
ECONNREFUSED/ETIMEDOUT (the WSA codes on Windows).
Dns
A DnsPolicy failed a lookup of name.