pub enum FormatCheckResult {
WellFormatted,
NeedsFormatting {
formatted: String,
},
ParseError(String),
}Expand description
Result of checking if a file is formatted.
Variants§
WellFormatted
The input is already well-formatted.
NeedsFormatting
The input needs formatting.
ParseError(String)
Failed to parse the input.
Implementations§
Source§impl FormatCheckResult
impl FormatCheckResult
Sourcepub fn is_well_formatted(&self) -> bool
pub fn is_well_formatted(&self) -> bool
Returns true if the input is well-formatted.
Sourcepub fn needs_formatting(&self) -> bool
pub fn needs_formatting(&self) -> bool
Returns true if the input needs formatting.
Sourcepub fn is_parse_error(&self) -> bool
pub fn is_parse_error(&self) -> bool
Returns true if there was a parse error.
Trait Implementations§
Source§impl Clone for FormatCheckResult
impl Clone for FormatCheckResult
Source§fn clone(&self) -> FormatCheckResult
fn clone(&self) -> FormatCheckResult
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 moreAuto Trait Implementations§
impl Freeze for FormatCheckResult
impl RefUnwindSafe for FormatCheckResult
impl Send for FormatCheckResult
impl Sync for FormatCheckResult
impl Unpin for FormatCheckResult
impl UnsafeUnpin for FormatCheckResult
impl UnwindSafe for FormatCheckResult
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