pub enum Outcome {
Verified,
InvalidSource,
UnsupportedFeature,
DisallowedAssumptions,
ResourceLimit,
InfrastructureFailure,
}Expand description
The outcome of a logos-lean-result/1 document, with the contract’s exit code.
Variants§
Verified
Every stage passed.
InvalidSource
A real rejection: the source, the export or the proof is wrong.
UnsupportedFeature
Valid input LOGOS does not (yet) carry to a verified result.
DisallowedAssumptions
The result depends on an assumption outside the policy.
ResourceLimit
A declared budget ran out before a decision.
InfrastructureFailure
The environment failed; nothing was decided about the input.
Implementations§
Source§impl Outcome
impl Outcome
pub const ALL: [Outcome; 6]
pub fn as_str(self) -> &'static str
Sourcepub fn exit_code(self) -> i32
pub fn exit_code(self) -> i32
The contract’s exit code: 0 verified · 1 invalid source · 2 unsupported feature · 3 disallowed assumptions · 4 resource limit · 5 infrastructure failure.
Sourcepub fn of_refusal(code: DiagnosticCode, rejected: bool) -> Outcome
pub fn of_refusal(code: DiagnosticCode, rejected: bool) -> Outcome
The outcome of a refusal: its code’s outcome, or — for a code without one — the verdict kind’s benchmark meaning (a rejection is invalid source, a decline an unsupported feature).
Trait Implementations§
Source§impl Ord for Outcome
impl Ord for Outcome
Source§impl PartialOrd for Outcome
impl PartialOrd for Outcome
impl Copy for Outcome
impl Eq for Outcome
impl StructuralPartialEq for Outcome
Auto Trait Implementations§
impl Freeze for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcome
impl UnwindSafe for Outcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more