Thanks!
I found the nix library has what I want with the sigaction
function.
In case someone else stumbles on this, here is what I found that works:
use nix::sys::signal;
extern fn handle_sigint(_:i32) {
println!("Interrupted!");
panic!();
}
fn main() {
let sig_action = signal::SigAction::new(handle_sigint,
signal::SockFlag::empty(),
signal::SigSet::empty());
signal::sigaction(signal::SIGINT, &sig_action);
}