nushell/crates/nu-protocol/src/value
Ian Manske 399a7c8836
Add and use new Signals struct (#13314)
# Description
This PR introduces a new `Signals` struct to replace our adhoc passing
around of `ctrlc: Option<Arc<AtomicBool>>`. Doing so has a few benefits:
- We can better enforce when/where resetting or triggering an interrupt
is allowed.
- Consolidates `nu_utils::ctrl_c::was_pressed` and other ad-hoc
re-implementations into a single place: `Signals::check`.
- This allows us to add other types of signals later if we want. E.g.,
exiting or suspension.
- Similarly, we can more easily change the underlying implementation if
we need to in the future.
- Places that used to have a `ctrlc` of `None` now use
`Signals::empty()`, so we can double check these usages for correctness
in the future.
2024-07-07 22:29:01 +00:00
..
custom_value.rs Make drop notification timing for plugin custom values more consistent (#12341) 2024-04-04 09:13:25 +02:00
duration.rs Restructure nu-protocol in more meaningful units (#11917) 2024-03-10 18:45:45 +01:00
filesize.rs Remove some macros (#12742) 2024-05-03 10:35:37 +02:00
from_value.rs Fix compilation for nu_protocol::value::from_value on 32-bit targets (#13169) 2024-06-18 07:16:08 -05:00
from.rs Spanned Value step 1: span all value cases (#10042) 2023-08-25 08:48:05 +12:00
glob.rs ls, rm, cp, open, touch, mkdir: Don't expand tilde if input path is quoted string or a variable. (#12232) 2024-03-25 10:08:38 +08:00
into_value.rs Add derive macros for FromValue and IntoValue to ease the use of Values in Rust code (#13031) 2024-06-17 16:05:11 -07:00
mod.rs Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
range.rs Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
record.rs Impl FusedIterator for record iterators (#12542) 2024-04-17 00:34:16 +02:00
test_derive.rs Allow missing fields in derived FromValue::from_value calls (#13206) 2024-06-22 13:31:09 -07:00