pub struct FmtResult {
pub changed: bool,
pub output: String,
}Expand description
Result of formatting a single file.
Indicates whether the file was already formatted or needed changes, and provides the formatted output when applicable.
Fields§
§changed: boolWhether the file content was changed by formatting.
output: StringThe formatted file content (identical to input if changed is false).
Implementations§
Source§impl FmtResult
impl FmtResult
pub fn get_changed(&self) -> bool
pub fn get_mut_changed(&mut self) -> &mut bool
pub fn set_changed(&mut self, val: bool) -> &mut Self
pub fn get_output(&self) -> &String
pub fn get_mut_output(&mut self) -> &mut String
pub fn set_output(&mut self, val: String) -> &mut Self
Auto Trait Implementations§
impl Freeze for FmtResult
impl RefUnwindSafe for FmtResult
impl Send for FmtResult
impl Sync for FmtResult
impl Unpin for FmtResult
impl UnsafeUnpin for FmtResult
impl UnwindSafe for FmtResult
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendSync for T
impl<T> AnySync for T
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