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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.