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.

Must be checked in long-running loops to allow graceful shutdown.

ยงExamples

use ssh_cli::signals::is_cancelled;

// Before registering a handler, returns false
assert!(!is_cancelled());