pub struct DupesReportPayload {
pub clone_groups: Vec<CloneGroupFinding>,
pub clone_families: Vec<CloneFamilyFinding>,
pub mirrored_directories: Vec<MirroredDirectory>,
pub stats: DuplicationStats,
}Expand description
Wire-shape payload for fallow dupes --format json (the body that
flattens into the DupesOutput envelope and is also
emitted under the dupes / duplication key inside the combined and
audit envelopes).
Mirrors DuplicationReport field-for-field, except clone_groups
and clone_families carry the typed wrapper envelopes instead of bare
findings, so the schema (and any TS / agent consumer) sees the typed
actions[] natively.
Fields§
§clone_groups: Vec<CloneGroupFinding>All detected clone groups, each wrapped with typed actions.
clone_families: Vec<CloneFamilyFinding>Clone families, each wrapped with typed actions. Inner groups
inside each CloneFamilyFinding are themselves wrapped as
CloneGroupFinding entries carrying their own actions[] (and
optional audit-mode introduced flag), so JSON-Schema strict
consumers and TS consumers reading clone_families[].groups[] see
the same shape as the top-level clone_groups[] array (preserves
the issue #393 regression contract).
mirrored_directories: Vec<MirroredDirectory>Mirrored directory pairs.
stats: DuplicationStatsAggregate duplication statistics.
Implementations§
Source§impl DupesReportPayload
impl DupesReportPayload
Sourcepub fn from_report(report: &DuplicationReport) -> Self
pub fn from_report(report: &DuplicationReport) -> Self
Build the payload from a bare DuplicationReport.
Sourcepub fn from_report_with_fragments(
report: &DuplicationReport,
include_fragments: bool,
) -> Self
pub fn from_report_with_fragments( report: &DuplicationReport, include_fragments: bool, ) -> Self
Build the payload and drop the verbatim source text when the caller asked for a location-only body.
Fingerprints, suggested names and actions are computed by
Self::from_report, so the text is only removed after every consumer
that reads it has run.
Sourcepub fn strip_fragments(&mut self)
pub fn strip_fragments(&mut self)
Drop the verbatim source text from every clone instance, including the
copies nested in clone_families[].groups[].
Trait Implementations§
Source§impl Clone for DupesReportPayload
impl Clone for DupesReportPayload
Source§impl Debug for DupesReportPayload
impl Debug for DupesReportPayload
Auto Trait Implementations§
impl Freeze for DupesReportPayload
impl RefUnwindSafe for DupesReportPayload
impl Send for DupesReportPayload
impl Sync for DupesReportPayload
impl Unpin for DupesReportPayload
impl UnsafeUnpin for DupesReportPayload
impl UnwindSafe for DupesReportPayload
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 more