pub struct ContractExample {
pub intent: String,
pub command: String,
}Expand description
One worked example, in the shape yolop’s commands use: a line saying what the caller is trying to do, then the command that does it.
Both halves matter, and a bare command line is the half that gets written
when the type does not ask for the other. yolop sessions search --query X
tells a reader the syntax they could have guessed; “Search prior sessions
for an exact marker” tells them when to reach for it. An agent reading
--help is choosing between commands, not recalling one it already knows.
Fields§
§intent: StringWhat this invocation accomplishes, as a phrase. No trailing period: the renderer adds the colon.
command: StringThe complete, runnable command line.
Trait Implementations§
Source§impl Clone for ContractExample
impl Clone for ContractExample
Source§impl Debug for ContractExample
impl Debug for ContractExample
Source§impl<'de> Deserialize<'de> for ContractExample
impl<'de> Deserialize<'de> for ContractExample
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 ContractExample
Source§impl PartialEq for ContractExample
impl PartialEq for ContractExample
Source§impl Serialize for ContractExample
impl Serialize for ContractExample
impl StructuralPartialEq for ContractExample
Auto Trait Implementations§
impl Freeze for ContractExample
impl RefUnwindSafe for ContractExample
impl Send for ContractExample
impl Sync for ContractExample
impl Unpin for ContractExample
impl UnsafeUnpin for ContractExample
impl UnwindSafe for ContractExample
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