pub enum FormatError {
ExecutableNotFound {
executable: String,
env: &'static str,
},
SpawnFailed {
executable: String,
source: Error,
},
InvocationFailed {
executable: String,
status: ExitStatusKind,
stderr: String,
},
}Expand description
Errors surfaced by the runner.
Variants§
ExecutableNotFound
The formatter executable was not found on the host. Surfaces the executable name the runner attempted to spawn and an actionable hint.
Fields
SpawnFailed
Spawning the formatter failed with an I/O error other than “not found”. Wraps the underlying error so the caller can render it verbatim.
InvocationFailed
The formatter ran but reported a non-zero exit status outside the documented “check-mode signals a diff” contract. Captured stderr (if any) is preserved so the CLI can show it to the user.
Fields
§
status: ExitStatusKindThe reported exit status. None when the process
was killed by a signal; the OS-specific code (if
any) is included in the message via the formatter.
Trait Implementations§
Source§impl Debug for FormatError
impl Debug for FormatError
Source§impl Display for FormatError
impl Display for FormatError
Source§impl Error for FormatError
impl Error for FormatError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for FormatError
impl !UnwindSafe for FormatError
impl Freeze for FormatError
impl Send for FormatError
impl Sync for FormatError
impl Unpin for FormatError
impl UnsafeUnpin for FormatError
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