pub enum FileOutcome {
Success {
duration: Duration,
},
Changed {
duration: Duration,
},
Unchanged {
duration: Duration,
},
Error {
error: Error,
duration: Duration,
},
}Expand description
Outcome of processing a single file.
Variants§
Success
File processed successfully (content may or may not have changed)
Changed
File formatted and content changed
Unchanged
File unchanged (already formatted)
Error
Processing failed
Implementations§
Source§impl FileOutcome
impl FileOutcome
Sourcepub const fn is_success(&self) -> bool
pub const fn is_success(&self) -> bool
Returns true if the file was successfully processed
Sourcepub const fn was_changed(&self) -> bool
pub const fn was_changed(&self) -> bool
Returns true if the file was changed
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileOutcome
impl !RefUnwindSafe for FileOutcome
impl Send for FileOutcome
impl Sync for FileOutcome
impl Unpin for FileOutcome
impl !UnwindSafe for FileOutcome
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