nushell/crates/nu-protocol
Reilly Wood e215fbbd08
Add helper method to check whether ctrl+c was pressed, adopt it (#7482)
I've been working on streaming and pipeline interruption lately. It was
bothering me that checking ctrl+c (something we want to do often) always
requires a bunch of boilerplate like:
```rust
use std::sync::atomic::Ordering;

if let Some(ctrlc) = &engine_state.ctrlc {
     if ctrlc.load(Ordering::SeqCst) {
          ...
```
I added a helper method to cut that down to:

```rust
if nu_utils::ctrl_c::was_pressed(&engine_state.ctrlc) {
    ...
```
2022-12-15 09:39:24 -08:00
..
src Add helper method to check whether ctrl+c was pressed, adopt it (#7482) 2022-12-15 09:39:24 -08:00
tests $env.config now always holds a record with only valid values (#7309) 2022-12-10 15:34:46 +02:00
Cargo.toml $env.config now always holds a record with only valid values (#7309) 2022-12-10 15:34:46 +02:00
LICENSE Include license text in all crates (#5094) 2022-04-08 10:47:13 +02:00
README.md Add nu-protocol 2021-09-02 13:29:43 +12:00

nu-protocol

The nu-protocol crate holds the definitions of structs/traits that are used throughout Nushell. This gives us one way to expose them to many other crates, as well as make these definitions available to each other, without causing mutually recursive dependencies.