Skip to main content

ResolverConfig

Struct ResolverConfig 

Source
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: bool

RS-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: bool

RS-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: bool

RS-P-3: an operation may fail individually.

§may_expire_waits: bool

RS-P-4: a wait may expire, including when completions are available.

§may_wake_empty: bool

RS-P-5: a wait may return successfully with nothing poppable.

§edge_triggered_signal: bool

RS-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: bool

RS-P-7: a submit may fail, leaving built operations queued for a later one.

§may_transfer_partially: bool

RS-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

Source

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.

Trait Implementations§

Source§

impl Clone for ResolverConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ResolverConfig

Source§

impl Debug for ResolverConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ResolverConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for ResolverConfig

Source§

impl PartialEq for ResolverConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ResolverConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.