knave 0.12.3

A Lisp programming language for humans and agents that infers types and ownership and compiles to readable Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::process::ExitStatus;

pub struct InterruptSignal;

impl InterruptSignal {
    pub const NUMBER: u8 = 2;

    #[cfg(unix)]
    pub fn stopped(status: ExitStatus) -> bool {
        use std::os::unix::process::ExitStatusExt;
        status.signal() == Some(i32::from(Self::NUMBER))
    }

    #[cfg(not(unix))]
    pub fn stopped(_status: ExitStatus) -> bool {
        false
    }
}