pub enum Outcome {
Propose {
action: String,
params: BTreeMap<String, OutValue>,
},
Escalate {
reason: String,
},
Unresolved(Unresolved),
UnresolvedAction {
reason: Unresolved,
action: Action,
},
Refused {
refusals: Vec<Refusal>,
addressed_to: Party,
},
NeedsInput(Box<NeedsInput>),
}Expand description
A judgment’s outcome. Version 1 uses Propose, Escalate and
Unresolved; version 2 (spec 033, 3.5.1) replaces Unresolved with
UnresolvedAction and adds Refused and NeedsInput. Both unresolved
forms share the wire key unresolved: {"unresolved": <reason>} in
version 1, {"unresolved": {"reason": <reason>, "action": <action>}} in
version 2.
Variants§
Implementations§
Source§impl Outcome
impl Outcome
Sourcepub fn unresolved(&self) -> Option<&Unresolved>
pub fn unresolved(&self) -> Option<&Unresolved>
The unresolved reason of either version, if the outcome is one.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Outcome
impl<'de> Deserialize<'de> for Outcome
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Outcome
impl JsonSchema for Outcome
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl 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