pub enum FormatReport {
Wrote {
files_processed: usize,
},
Clean {
files_inspected: usize,
},
NeedsFormatting {
files_inspected: usize,
stderr: String,
},
}Expand description
Per-mode outcome of run_formatter.
Variants§
Wrote
Write-mode succeeded. Every supplied file was
processed by the formatter; whether or not it was
actually modified is not reported (real clang-format -i does not advertise that distinction either).
Clean
Check-mode succeeded. Every supplied file was already formatted.
NeedsFormatting
Check-mode reported at least one file that would be reformatted.
Fields
§
stderr: StringFormatter stderr, trimmed of trailing whitespace.
Carries the per-file would be reformatted lines (or
any other diagnostic clang-format emitted under
--dry-run -Werror) so the orchestration layer can
pass them through to the user — matching cargo fmt --check, which forwards rustfmt’s diff verbatim.
Trait Implementations§
Source§impl Clone for FormatReport
impl Clone for FormatReport
Source§fn clone(&self) -> FormatReport
fn clone(&self) -> FormatReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormatReport
impl Debug for FormatReport
impl Eq for FormatReport
Source§impl PartialEq for FormatReport
impl PartialEq for FormatReport
Source§fn eq(&self, other: &FormatReport) -> bool
fn eq(&self, other: &FormatReport) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FormatReport
Auto Trait Implementations§
impl Freeze for FormatReport
impl RefUnwindSafe for FormatReport
impl Send for FormatReport
impl Sync for FormatReport
impl Unpin for FormatReport
impl UnsafeUnpin for FormatReport
impl UnwindSafe for FormatReport
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.