"span": {
"start": 560,
"end": 566
}
}
}
}
]
}
]
}
```
##### `Operation`
Returns the result of evaluating an [`Operator`](#operator) on this custom value with another value. The argument is a 2-tuple: (`operator`, `value`), where `operator` is a spanned [`Operator`](#operator) and `value` is a [`Value`](#value), which may be any value - not just the same custom value type. The response type is [`PipelineData`](#pipelinedata-plugin-call-response) or [`Error`](#error-plugin-call-response). The result **may** be another custom value. If the operation produces a stream, it will be consumed to a value.
Example:
```nu
$version + 7
```
```json
{
"Call": [
0,
{
"CustomValueOp": [
{
"item": {
"name": "version",
"data": [0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0]
},
"span": {
"start": 90,
"end": 96
}
},
{
"Operation": [
{
"item": {
"Math": "Plus"
},
"span": {
"start": 180,
"end": 181
}
},
{
"Int": {
"val": 7,
"span": {
"start": 183,
"end": 184
}
}
}
]
}
]
}
]
}
```
##### `Dropped`
This op is used to notify the plugin that a [`PluginCustomValue`](#plugincustomvalue) that had `notify_on_drop` set to `true` was dropped in the engine - i.e., all copies of it have gone out of scope. For more information on exactly under what circumstances this is sent, see the [drop notification](plugins.md#drop-notification) section of the plugin reference. The response type is [`Empty` pipeline data](#empty-header-variant) or [`Error`](#error-plugin-call-response).
Example:
```json
{
"Call": [
0,
{
"CustomValueOp": [
{
"item": {
"name": "handle",
"data": [78, 60],
"notify_on_drop": true
},
"span": {
"start": 1820,
"end": 1835
}
},
"Dropped"
]
}
]
}
```
### `EngineCallResponse`
A response to an [engine call](#enginecall) made by the plugin. The argument is a 2-tuple (array): (`engine_call_id`, `engine_call`)
The `engine_call_id` refers to the same number that the engine call being responded to originally contained. The plugin **must** send unique IDs for each engine call it makes. Like [`CallResponse`](#callresponse), there are multiple types of responses:
#### `Error` engine call response
A failure result. Contains a [`LabeledError`](#labelederror).
Example:
```json
{
"EngineCallResponse": [
0,
{
"Error": {
"LabeledError": {
"msg": "The connection closed.",
"labels": [],
"code": null,
"url": null,
"help": null,
"inner": []
}
}
}
]
}
```
#### `PipelineData` engine call response
A successful result with a Nu [`Value`](#value) or stream. The body is a [`PipelineDataHeader`](#pipelinedataheader).
Example:
```json
{
"EngineCallResponse": [
0,
{
"ListStream": {
"id": 23,
"span": {
"start": 8081,
"end": 8087
}
}
}
]
}
```
#### `Config` engine call response
A successful result of a [`Config` engine call](#config-engine-call). The body is a [`Config`](#config).
Example:
```json
{
"EngineCallResponse": [
0,
{
"Config": {
"external_completer": null,
"filesize_metric": true,
"table_mode": "Rounded",
"table_move_header": false,
...
}
}
]
}
```
This example is abbreviated, as the [`Config`](#config) object is large and ever-changing.
#### `ValueMap` engine call response