nushell/crates/nu-protocol/src
Stefan Holderbach b19da158d5
Rename Value::CustomValue to Value::Custom (#12309)
# Description
The second `Value` is redundant and will consume five extra bytes on
each transmission of a custom value to/from a plugin.

# User-Facing Changes
This is a breaking change to the plugin protocol.

The [example in the protocol
reference](https://www.nushell.sh/contributor-book/plugin_protocol_reference.html#value)
becomes

```json
{
  "Custom": {
    "val": {
      "type": "PluginCustomValue",
      "name": "database",
      "data": [36, 190, 127, 40, 12, 3, 46, 83],
      "notify_on_drop": true
    },
    "span": {
      "start": 320,
      "end": 340
    }
  }
}
```

instead of 

```json
{
  "CustomValue": {
    ...
  }
}
```


# After Submitting
Update plugin protocol reference
2024-03-27 22:10:56 +01:00
..
ast Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
config Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
debugger Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
engine Change PluginCommand API to be more like Command (#12279) 2024-03-27 11:59:57 +01:00
errors bump rust-toolchain to 1.75.0 (#12258) 2024-03-21 13:23:39 -05:00
pipeline_data Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
plugin Change PluginCommand API to be more like Command (#12279) 2024-03-27 11:59:57 +01:00
value Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00
alias.rs IO and redirection overhaul (#11934) 2024-03-14 15:51:55 -05:00
did_you_mean.rs Improve case insensitivity consistency (#10884) 2023-11-08 23:58:54 +01:00
eval_base.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
eval_const.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
example.rs Change PluginCommand API to be more like Command (#12279) 2024-03-27 11:59:57 +01:00
id.rs Add virtual path abstraction layer (#9245) 2023-05-23 23:48:50 +03:00
lev_distance.rs Suggest existing variables on not found (#8902) 2023-05-02 18:17:14 +03:00
lib.rs Restructure nu-protocol in more meaningful units (#11917) 2024-03-10 18:45:45 +01:00
module.rs Error on use path item1 item2, if item1 is not a module (#11183) 2023-12-05 11:38:45 +01:00
signature.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
span.rs Replace panics with errors in thread spawning (#12040) 2024-03-02 11:14:02 -06:00
syntax_shape.rs open, rm, umv, cp, rm and du: Don't globs if inputs are variables or string interpolation (#11886) 2024-02-23 09:17:09 +08:00
ty.rs Glob: don't allow implicit casting between glob and string (#11992) 2024-02-28 23:05:35 +08:00
util.rs Convert more ShellError variants to named fields (#11173) 2023-11-28 06:43:51 -06:00