pub enum HookExecutionError {
CommandNotFound {
command: String,
hook_id: String,
language: String,
suggestion: Option<String>,
},
ExecutionTimeout {
hook_id: String,
timeout: Duration,
partial_output: Option<String>,
},
PermissionDenied {
hook_id: String,
command: String,
path: PathBuf,
suggestion: Option<String>,
},
NonZeroExit {
hook_id: String,
command: String,
exit_code: i32,
stdout: String,
stderr: String,
files_processed: Vec<PathBuf>,
},
EnvironmentSetupFailed {
language: String,
hook_id: String,
message: String,
suggestion: Option<String>,
},
DependencyInstallFailed {
dependency: String,
hook_id: String,
language: String,
error: String,
},
InvalidCommand {
hook_id: String,
command: String,
error: String,
},
ExecutionFailed {
hook_id: String,
exit_code: i32,
stdout: String,
stderr: String,
},
}Expand description
Hook execution errors with detailed context
Variants§
CommandNotFound
ExecutionTimeout
PermissionDenied
NonZeroExit
Fields
EnvironmentSetupFailed
DependencyInstallFailed
InvalidCommand
ExecutionFailed
Trait Implementations§
Source§impl Clone for HookExecutionError
impl Clone for HookExecutionError
Source§fn clone(&self) -> HookExecutionError
fn clone(&self) -> HookExecutionError
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HookExecutionError
impl Debug for HookExecutionError
Source§impl Display for HookExecutionError
impl Display for HookExecutionError
Source§impl Error for HookExecutionError
impl Error for HookExecutionError
1.30.0§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§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for HookExecutionError
impl RefUnwindSafe for HookExecutionError
impl Send for HookExecutionError
impl Sync for HookExecutionError
impl Unpin for HookExecutionError
impl UnwindSafe for HookExecutionError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.