I made a library that's used by a larger application. The application calls some function of my library, which is blocking. Currently, you cannot interrupt the application while my library's code is running. I want to be able to terminate my library with Ctrl+C, which should: Run some cleanup actions, including killing a process, starting a process, and writing to files. This does not need to be interruptible; e.g. a second Ctrl+C does not need to do anything. Return an Err(Error::Interrupted...| The Rust Programming Language Forum
How can I correctly declare type inside declarative macro by separating type's name itself and it's generics ? Consider this example: struct RectangleA; struct RectangleB; I want to separate type declaration (and possibly it's genercics) between few macroses to match on different parameters. I see it like this: macro_rules! get_type { (false) => { RectangleA } (true) => { RectangleB ...| The Rust Programming Language Forum