pub struct JsonOutput {
pub mode: String,
pub projects: Vec<JsonProjectEntry>,
pub summary: JsonSummary,
pub cleanup: Option<JsonCleanupResult>,
}Expand description
Top-level JSON output emitted when --json is active.
Fields§
§mode: StringThe execution mode: "dry_run" or "cleanup".
projects: Vec<JsonProjectEntry>List of projects that were found (and matched filters).
summary: JsonSummaryAggregated summary statistics.
cleanup: Option<JsonCleanupResult>Cleanup results. Present only when an actual cleanup was performed (i.e. not in dry-run mode).
Implementations§
Source§impl JsonOutput
impl JsonOutput
Sourcepub fn from_projects_dry_run(projects: &[Project]) -> Self
pub fn from_projects_dry_run(projects: &[Project]) -> Self
Build a JsonOutput from a slice of projects in dry-run mode.
Sourcepub fn from_projects_cleanup(
projects: &[Project],
clean_result: &CleanResult,
) -> Self
pub fn from_projects_cleanup( projects: &[Project], clean_result: &CleanResult, ) -> Self
Build a JsonOutput from a slice of projects after a cleanup operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsonOutput
impl RefUnwindSafe for JsonOutput
impl Send for JsonOutput
impl Sync for JsonOutput
impl Unpin for JsonOutput
impl UnsafeUnpin for JsonOutput
impl UnwindSafe for JsonOutput
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
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>
Converts
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>
Converts
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