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 (const: unstable) · Source§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 · 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 Freeze for HookExecutionError
impl RefUnwindSafe for HookExecutionError
impl Send for HookExecutionError
impl Sync for HookExecutionError
impl Unpin for HookExecutionError
impl UnsafeUnpin for HookExecutionError
impl UnwindSafe for HookExecutionError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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.