INNER CODE UNIT · Rust
with_signal
psmux/psmux · crates/portable-pty-psmux/src/lib.rs:204
pub fn with_signal(signal: &str) -> Self {
Self {
code: 1,
signal: Some(signal.to_string()),
}
}
/// Returns true if the status indicates successful completion
pub fn success(&self) -> bool {
match self.signal {
None => self.code == 0,
Some(_) => false,
}
}
/// Returns the exit code that this ExitStatus was constructed with
pub fn exit_code(&self) -> u32 {
self.code