pub enum InjectedFailure {
Ring(RingCondition),
Win32(u32),
Hresult(HRESULT),
}Expand description
The fault-injection seam (M16.3), for exercising failure paths a healthy
machine will not produce on demand. See
Completion::with_injected_failure for why transforming a real
completion is sound where fabricating one would not be.
A failure to report in place of a completion’s real result (M16.3).
Three spellings of the same thing, chosen so a call site reads as what it is testing rather than as a hexadecimal constant.
Available only under the fault-injection feature; see
Completion::with_injected_failure.
Variants§
Ring(RingCondition)
One of the ring’s own IORING_E_* conditions.
Win32(u32)
A Win32 error code, wrapped the way the kernel wraps one – so
(hresult as u32) & 0xFFFF recovers it, which is how this crate’s
tests read a real one back.
Hresult(HRESULT)
A raw HRESULT, for a failure neither of the above names.
Trait Implementations§
Source§impl Clone for InjectedFailure
impl Clone for InjectedFailure
Source§fn clone(&self) -> InjectedFailure
fn clone(&self) -> InjectedFailure
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more