Skip to content

Commit bf75163

Browse files
committed
Documentation for GetSpanContents engine call
1 parent fa0abf7 commit bf75163

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

contributor-book/plugin_protocol_reference.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,27 @@ Example:
806806
}
807807
```
808808

809+
#### `GetSpanContents` engine call
810+
811+
Get the contents of a [`Span`](#span) from the engine. This can be used for viewing the source code that generated a value. The argument is a [`Span`](#span). The response on success is [`Value` pipeline data](3pipelinedataheader-value) containing a [`Binary`](#binary) value, as the result is not guaranteed to be valid UTF-8.
812+
813+
Example:
814+
815+
```json
816+
{
817+
"EngineCall": {
818+
"context": 40,
819+
"id": 72,
820+
"call": {
821+
"GetSpanContents": {
822+
"start": 38881,
823+
"end": 39007
824+
}
825+
}
826+
}
827+
}
828+
```
829+
809830
#### `EvalClosure` engine call
810831

811832
Pass a [`Closure`](#closure) and arguments to the engine to be evaluated. Returns a [`PipelineData` response](#pipelinedata-engine-call-response) if successful with the output of the closure, which may be a stream.

0 commit comments

Comments
 (0)