pub enum Format {
Text,
Json,
Stream,
}Expand description
Output shape requested from the agent.
Variants§
Text
Plain prose on stdout. Carries no session id and no events.
Json
One JSON result document, delivered when the turn ends.
Nothing is observable until then, so a caller watching a run sees nothing for its whole duration. Cheaper to parse, and fine when only the answer matters.
Stream
A JSONL event stream, normalized into crate::Events.
The default, because the alternative is silence: under Json a run that
takes twenty minutes reports nothing for twenty minutes. This carries
everything Json does, the session id and any schema-conforming value
included, so defaulting to it costs only parsing.
Trait Implementations§
impl Copy for Format
Source§impl<'de> Deserialize<'de> for Format
impl<'de> Deserialize<'de> for Format
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 Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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