pub enum FormatterError {
PartialOverride {
path: RepositoryPath,
},
EmptyCommand {
path: RepositoryPath,
},
MissingInput {
path: RepositoryPath,
project_root_file: RepositoryPath,
},
Spawn {
path: RepositoryPath,
command: String,
source: Error,
},
Failed {
path: RepositoryPath,
command: String,
status: ExitStatus,
stderr: String,
},
}Expand description
A formatter could not be applied to a file.
Variants§
PartialOverride
A partial document declares a per-file formatter override.
Fields
§
path: RepositoryPathThe partial document that declared the override.
EmptyCommand
A formatter spec has no command to run.
Fields
§
path: RepositoryPathThe file the empty formatter was declared for.
MissingInput
A formatter’s declared project root file is missing from its inputs.
Fields
§
path: RepositoryPathThe file being formatted.
§
project_root_file: RepositoryPathThe missing project root file.
Spawn
A formatter command could not be started.
Fields
§
path: RepositoryPathThe file that was being formatted.
Failed
A formatter command exited unsuccessfully.
Fields
§
path: RepositoryPathThe file that was being formatted.
§
status: ExitStatusThe formatter process’s exit status.
Trait Implementations§
Source§impl Debug for FormatterError
impl Debug for FormatterError
Source§impl Display for FormatterError
impl Display for FormatterError
Source§impl Error for FormatterError
impl Error for FormatterError
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()
Source§impl From<FormatterError> for FilesError
impl From<FormatterError> for FilesError
Source§fn from(source: FormatterError) -> Self
fn from(source: FormatterError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FormatterError
impl !UnwindSafe for FormatterError
impl Freeze for FormatterError
impl Send for FormatterError
impl Sync for FormatterError
impl Unpin for FormatterError
impl UnsafeUnpin for FormatterError
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