pub enum FallowOutput {
Audit(AuditOutput),
Explain(ExplainOutput),
ReviewEnvelope(ReviewEnvelopeOutput),
ReviewReconcile(ReviewReconcileOutput),
CoverageSetup(CoverageSetupOutput),
CoverageAnalyze(CoverageAnalyzeOutput),
ListBoundaries(ListBoundariesOutput),
Health(HealthOutput),
Dupes(DupesOutput),
CheckGrouped(CheckGroupedOutput),
Check(CheckOutput),
Combined(CombinedOutput),
}Expand description
Typed root of every fallow --format json envelope shape that
serializes as a JSON object. The schema derived from this enum drives
the document-root oneOf in docs/output-schema.json, replacing the
previously hand-maintained block.
#[serde(untagged)] preserves wire compatibility: consumers see exactly
the same top-level keys today (schema_version, version, plus the
per-envelope shape). The schema’s oneOf lets agents narrow by trying
variants in order; field sets differ enough that the first matching
variant is the correct one in practice. Note that HealthOutput and
DupesOutput flatten their inner body (HealthReport /
DuplicationReport) into top-level fields, so the actual
discriminators are nested-body keys such as health_score (health) and
clone_groups (dupes), NOT report or groups.
Variant order is most-specific first. Schemars 1 preserves
declaration order in the emitted oneOf, and validators that enforce
strict oneOf (and any future migration that adds Deserialize) will
try branches top-to-bottom. The required-field sets shrink as we move
down the list, with CombinedOutput last because its three required
fields (schema_version, version, elapsed_ms) are a strict subset
of every other variant’s required set; placing it earlier would let a
CheckOutput payload silently match CombinedOutput first.
One envelope is intentionally NOT in this enum:
CodeClimateOutputserializes as a bare JSON array (#[serde(transparent)]) per the Code Climate / GitLab Code Quality spec;#[serde(tag = ...)]cannot internally tag a non-object variant and wrapping the array would break the spec. The root schema carries it as a siblingoneOfbranch alongsideFallowOutput.
A future major release plans to switch this to
#[serde(tag = "kind")] for true O(1) discriminability on AI / agent
consumers, paired with a one-cycle --legacy-envelope opt-out flag.
Tracked under issue #384.
Variants§
Audit(AuditOutput)
fallow audit --format json. Required command: "audit" singleton
plus verdict and summary.
Explain(ExplainOutput)
fallow explain <issue-type> --format json. Required id, name,
rationale, example, how_to_fix, docs; no schema_version.
ReviewEnvelope(ReviewEnvelopeOutput)
fallow --format review-github / --format review-gitlab. Required
body, comments, meta; no schema_version.
ReviewReconcile(ReviewReconcileOutput)
fallow ci reconcile-review --format json. Required schema
singleton plus provider, comments, and the various
*_fingerprints arrays.
CoverageSetup(CoverageSetupOutput)
fallow coverage setup --json. Required schema_version singleton
plus framework_detected, members, commands, snippets.
CoverageAnalyze(CoverageAnalyzeOutput)
fallow coverage analyze --format json. Required
schema_version: "1" singleton plus version, elapsed_ms,
runtime_coverage. The runtime_coverage discriminator field is
uniquely present here; ordered before broader variants so untagged
narrowing matches CoverageAnalyzeOutput first.
ListBoundaries(ListBoundariesOutput)
fallow list --boundaries --format json. Required boundaries
sub-object; no schema_version.
Health(HealthOutput)
fallow health --format json. Required report: HealthReport.
Dupes(DupesOutput)
fallow dupes --format json. Required report: DupesReportPayload
(typed wrapper payload carrying clone_groups[]: CloneGroupFinding
and clone_families[]: CloneFamilyFinding).
CheckGrouped(CheckGroupedOutput)
fallow check --format json --group-by <mode>. Required grouped_by
plus a groups array; ordered before Self::Check because the
grouped_by discriminator field is uniquely present here.
Check(CheckOutput)
fallow check --format json / fallow dead-code --format json.
Required total_issues plus summary: CheckSummary.
Combined(CombinedOutput)
Bare fallow --format json (combined dead-code + dupes + health).
LAST because its required-field set (schema_version, version,
elapsed_ms) is a strict subset of every other variant’s required
set; placing it earlier would let untagged narrowing match a
CheckOutput payload against CombinedOutput first.
Trait Implementations§
Source§impl Clone for FallowOutput
impl Clone for FallowOutput
Source§fn clone(&self) -> FallowOutput
fn clone(&self) -> FallowOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FallowOutput
impl Debug for FallowOutput
Auto Trait Implementations§
impl Freeze for FallowOutput
impl RefUnwindSafe for FallowOutput
impl Send for FallowOutput
impl Sync for FallowOutput
impl Unpin for FallowOutput
impl UnsafeUnpin for FallowOutput
impl UnwindSafe for FallowOutput
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more