#[non_exhaustive]pub enum TerminationError {
SignalFailed {
process_name: Cow<'static, str>,
attempt_errors: Vec<TerminationAttemptError>,
},
TerminationFailed {
process_name: Cow<'static, str>,
attempt_errors: Vec<TerminationAttemptError>,
},
}Expand description
Errors that can occur when terminating a process.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SignalFailed
Failed to manually send a graceful signal to the process.
Fields
§
attempt_errors: Vec<TerminationAttemptError>Errors recorded while attempting to send the signal, in chronological order.
TerminationFailed
Failed to terminate the process after trying all platform termination signals.
Implementations§
Source§impl TerminationError
impl TerminationError
Sourcepub fn process_name(&self) -> &str
pub fn process_name(&self) -> &str
The name of the process involved in the termination error.
Sourcepub fn attempt_errors(&self) -> &[TerminationAttemptError]
pub fn attempt_errors(&self) -> &[TerminationAttemptError]
Errors recorded while attempting the operation, in chronological order.
Trait Implementations§
Source§impl Debug for TerminationError
impl Debug for TerminationError
Source§impl Display for TerminationError
impl Display for TerminationError
Source§impl Error for TerminationError
impl Error for TerminationError
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 TerminationError
impl !RefUnwindSafe for TerminationError
impl Send for TerminationError
impl Sync for TerminationError
impl Unpin for TerminationError
impl UnsafeUnpin for TerminationError
impl !UnwindSafe for TerminationError
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