pub struct Termination { /* private fields */ }Expand description
A request to end the process: an interrupt or termination signal on Unix, a console control event on Windows.
Implementations§
Source§impl Termination
impl Termination
Sourcepub const fn new(name: &'static str, exit_code: u8, closing: bool) -> Self
pub const fn new(name: &'static str, exit_code: u8, closing: bool) -> Self
Creates a termination; platform handlers and tests use this.
Sourcepub const fn exit_code(self) -> u8
pub const fn exit_code(self) -> u8
The exit status to report: 128 plus the signal number, as a shell does. On Windows an
interrupt or break maps to 130 and a close, logoff or shutdown to 143.
Sourcepub const fn closing(self) -> bool
pub const fn closing(self) -> bool
Whether the OS kills the process once the handler returns (Windows console close, logoff, shutdown), so cleanup must finish before returning.
Sourcepub fn parent_exited(self) -> bool
pub fn parent_exited(self) -> bool
Whether the process that started this one exited (crate::watch_parent).
Trait Implementations§
Source§impl Clone for Termination
impl Clone for Termination
impl Copy for Termination
Source§impl Debug for Termination
impl Debug for Termination
impl Eq for Termination
Source§impl PartialEq for Termination
impl PartialEq for Termination
impl StructuralPartialEq for Termination
Auto Trait Implementations§
impl Forget for Termination
impl Freeze for Termination
impl Move for Termination
impl RefUnwindSafe for Termination
impl Send for Termination
impl Sync for Termination
impl Unpin for Termination
impl UnsafeUnpin for Terminationwhere
&'static str: UnsafeUnpin,
impl UnwindSafe for Terminationwhere
&'static str: UnwindSafe,
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