pub struct ResolverConfig {
pub may_pend: bool,
pub may_reorder: bool,
pub may_fail_operations: bool,
pub may_expire_waits: bool,
pub may_wake_empty: bool,
pub edge_triggered_signal: bool,
pub may_fail_submits: bool,
pub may_transfer_partially: bool,
}Expand description
Which permissions this resolver exercises.
Every field names its clause. All default to true – the widest point in
the space – so that narrowing is a visible, deliberate act in a test
rather than something a resolver quietly failed to do.
Fields§
§may_pend: boolRS-P-1: an operation may complete inside SubmitIoRing, or pend.
With this off every operation completes inside the submit that carried it, which is the narrowest reading of the clause and the one a test isolating some other freedom usually wants.
may_reorder: boolRS-P-2: completion order is unconstrained.
With this off completions are posted in submission order. That is not a promise Windows makes – D-47 measured it broken – so a test turning this off is narrowing to isolate, never asserting FIFO.
may_fail_operations: boolRS-P-3: an operation may fail individually.
may_expire_waits: boolRS-P-4: a wait may expire, including when completions are available.
may_wake_empty: boolRS-P-5: a wait may return successfully with nothing poppable.
edge_triggered_signal: boolRS-P-6: a completion posted while the queue was already non-empty
need produce no signal.
With this off every post signals. That is wider than the platform – D-19 measured the event as edge triggered – so it exists to show the edge behaviour is load-bearing, not as a configuration any consumer should rely on.
may_fail_submits: boolRS-P-7: a submit may fail, leaving built operations queued for a
later one.
may_transfer_partially: boolRS-P-8: a successful transfer may report fewer bytes than requested.
With this off every successful read or write reports the full requested length. That is the behaviour of an ordinary file on a local volume, and so the narrowing a test wants when its subject is something else – but it is narrower than the platform, because this crate does not constrain what kind of handle a caller registers.
Implementations§
Source§impl ResolverConfig
impl ResolverConfig
Sourcepub const fn narrowest() -> Self
pub const fn narrowest() -> Self
Every permission off: operations complete inside their submit, in order, successfully, and no wait misbehaves.
The narrowest point in the space, and therefore the weakest test. It exists so a test can turn on exactly the one freedom it is about, and so a reader can tell that choice from an accident.