Skip to main content

is_cancelled

Function is_cancelled 

Source
pub fn is_cancelled() -> bool
Expand description

Returns true if the user pressed Ctrl+C (SIGINT).

Prefer should_stop when either SIGINT or SIGTERM should abort work.

ยงExamples

use ssh_cli::signals::is_cancelled;

// Before a signal is delivered, returns false
assert!(!is_cancelled());