pub enum OutputFormat {
Json,
Auto,
Table,
}Expand description
Output serialization format for verb results (ADR-078).
Orthogonal to PresentationMode: PresentationMode controls field-level
transforms (UUID shortening, timestamp compaction, empty-field dropping);
OutputFormat controls how the resulting serde_json::Value is serialized
or rendered to the wire string.
Default is OutputFormat::Json on every surface: compact and
machine-walkable. Verbose JSON is lossless; Agent JSON additionally elides
namespace="local" and duplicate properties entries (ADR-078 Amendment
3, Machine scope) but keeps full_id — it is the caller’s chaining
handle, not a redundant field.
Note: Yaml is a clean follow-up — implemented as a 3-variant enum
(Json, Auto, Table) per ADR-078 §“yaml” which permits omission when
the in-tree emitter would balloon.
Variants§
Json
Compact JSON (serde_json::to_string). Default; lossless in Verbose
presentation, Machine-scope redundancy-reduced in Agent presentation
(full_id retained — see RedundancyScope).
Auto
Shape-aware: markdown table for homogeneous record arrays (with
envelope siblings preserved as trailing key: value lines),
compact-JSON fallback for every other shape.
Table
Force the markdown-table renderer regardless of detected shape. Ordinary results share Auto’s dispatch. Opt-in parsed note bodies are stringified for table display; Auto preserves their JSON values.
Trait Implementations§
Source§impl Clone for OutputFormat
impl Clone for OutputFormat
impl Copy for OutputFormat
Source§impl Debug for OutputFormat
impl Debug for OutputFormat
Source§impl Default for OutputFormat
impl Default for OutputFormat
Source§impl<'de> Deserialize<'de> for OutputFormat
impl<'de> Deserialize<'de> for OutputFormat
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>,
impl Eq for OutputFormat
Source§impl PartialEq for OutputFormat
impl PartialEq for OutputFormat
Source§impl Serialize for OutputFormat
impl Serialize for OutputFormat
impl StructuralPartialEq for OutputFormat
Auto Trait Implementations§
impl Freeze for OutputFormat
impl RefUnwindSafe for OutputFormat
impl Send for OutputFormat
impl Sync for OutputFormat
impl Unpin for OutputFormat
impl UnsafeUnpin for OutputFormat
impl UnwindSafe for OutputFormat
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more