pub struct E2eOpExample {
pub description: String,
pub args: Json,
pub returns: Json,
}Expand description
A worked example: what to send, and what comes back.
Both halves matter. The arguments alone tell a caller how to invoke the op; the RETURN tells it what it can then assert on, which is what a scenario author and an agent each need before committing to a call.
Fields§
§description: String§args: JsonExample arguments — a real JSON value, not a string containing JSON.
These were String first, which serialized as escaped JSON inside
JSON: every consumer parsed twice and nothing checked the inner text
was even well-formed, so a malformed example sat in the schema looking
fine.
returns: JsonWhat the op returns for those arguments.
MUST contain a success boolean — validated when the schema is
installed, see E2eOpSchema::validate.
Trait Implementations§
Source§impl Clone for E2eOpExample
impl Clone for E2eOpExample
Source§fn clone(&self) -> E2eOpExample
fn clone(&self) -> E2eOpExample
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for E2eOpExample
impl Debug for E2eOpExample
Source§impl Default for E2eOpExample
impl Default for E2eOpExample
Source§fn default() -> E2eOpExample
fn default() -> E2eOpExample
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for E2eOpExample
impl<'de> Deserialize<'de> for E2eOpExample
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 PartialEq for E2eOpExample
impl PartialEq for E2eOpExample
Source§impl Serialize for E2eOpExample
impl Serialize for E2eOpExample
impl StructuralPartialEq for E2eOpExample
Auto Trait Implementations§
impl Freeze for E2eOpExample
impl RefUnwindSafe for E2eOpExample
impl Send for E2eOpExample
impl Sync for E2eOpExample
impl Unpin for E2eOpExample
impl UnsafeUnpin for E2eOpExample
impl UnwindSafe for E2eOpExample
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