Returns the exit code of the hook if it was a command hook that ran to completion.
(&self)
| 504 | impl HookResult { |
| 505 | /// Returns the exit code of the hook if it was a command hook that ran to completion. |
| 506 | pub fn exit_code(&self) -> Option<i32> { |
| 507 | match self { |
| 508 | HookResult::Command(Ok(CommandResult { exit_code, .. })) => Some(*exit_code), |
| 509 | _ => None, |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | pub fn is_success(&self) -> bool { |
| 514 | match self { |