pub enum ToolAnswer {
Answered {
result: Payload,
},
Failed {
error: Payload,
},
}Expand description
A call answers exactly one way, and the enum is what says so: two independent optional keys would let a line hold both or neither, and every reader would have to invent a verdict for the two shapes that cannot happen.
Untagged, because the keys are the discriminator the hand-written writer left behind and a ledger already on disk cannot be re-spelled.
Variants§
Answered
The tool answered; the payload is the tool’s own result shape.
Failed
The tool refused or failed; the payload is the serialized
AxError, which carries the code, the subject and the recovery
the model is expected to act on.
Trait Implementations§
Source§impl Clone for ToolAnswer
impl Clone for ToolAnswer
Source§impl Debug for ToolAnswer
impl Debug for ToolAnswer
Source§impl<'de> Deserialize<'de> for ToolAnswer
impl<'de> Deserialize<'de> for ToolAnswer
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
impl Eq for ToolAnswer
Source§impl PartialEq for ToolAnswer
impl PartialEq for ToolAnswer
Source§impl Serialize for ToolAnswer
impl Serialize for ToolAnswer
impl StructuralPartialEq for ToolAnswer
Auto Trait Implementations§
impl Freeze for ToolAnswer
impl RefUnwindSafe for ToolAnswer
impl Send for ToolAnswer
impl Sync for ToolAnswer
impl Unpin for ToolAnswer
impl UnsafeUnpin for ToolAnswer
impl UnwindSafe for ToolAnswer
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