pub enum Refusal {
Widened {
atom: Box<GrantAtom>,
parent: Box<GrantSet>,
},
UndecidableContainment {
atom: Box<GrantAtom>,
against: Box<GrantAtom>,
reason: Undecidable,
},
Interference(Box<Conflict>),
UndecidableDisjointness {
conflict: Box<Conflict>,
reason: Undecidable,
},
}Expand description
Why the solver refused a flow.
Grant payloads are boxed. Refusal is the error half of the compiler’s
Results, so its size is paid on the success path too, and a pair of atoms
plus a set is well past the point where that starts to cost. The
constructors hide the boxing; only exhaustive matches see it.
Variants§
Widened
A grant widened along an edge. Law I forbids it.
Fields
UndecidableContainment
Containment could not be decided, so the flow is refused.
Fields
reason: UndecidableWhy the comparison could not be made.
Interference(Box<Conflict>)
Two branches were proved to interfere.
UndecidableDisjointness
Two branches could not be proved not to interfere.
Fields
reason: UndecidableWhy the comparison could not be made.
Implementations§
Source§impl Refusal
impl Refusal
Sourcepub fn is_proved(&self) -> bool
pub fn is_proved(&self) -> bool
Whether this refusal is a proved violation rather than a solver gap.
Both refuse the flow. The distinction is for diagnostics: a proved violation means the flow is wrong, an undecided one means the flow may be fine but is spelled in a way the solver cannot check.
Sourcepub fn suggestion(&self) -> &'static str
pub fn suggestion(&self) -> &'static str
A suggested fix, phrased for the author.
Trait Implementations§
impl Eq for Refusal
Source§impl Error for Refusal
impl Error for Refusal
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()