Expand description
Type definitions, including full Serialize
and Deserialize
implementations, for the protocol
used for communication between the engine and a plugin.
See the plugin protocol reference for more details on what exactly is being specified here.
Plugins accept messages of PluginInput
and send messages back of PluginOutput
. This
crate explicitly avoids implementing any functionality that depends on I/O, so the exact
byte-level encoding scheme is not implemented here. See the protocol ref or nu_plugin_core
for
more details on how that works.
Structs§
- Byte
Stream Info - Additional information about byte streams
- Call
Info - Information about a plugin command invocation. This includes an
EvaluatedCall
as a serializable representation ofnu_protocol::ast::Call
. The type parameter determines the input type. - Evaluated
Call - A representation of the plugin’s invocation command including command line args
- List
Stream Info - Additional information about list (value) streams
- Plugin
Custom Value - An opaque container for a custom value that is handled fully by a plugin.
- Protocol
Info - Protocol information, sent as a
Hello
message on initialization. This determines the compatibility of the plugin and engine. They are considered to be compatible if the lower version is semver compatible with the higher one.
Enums§
- Custom
Value Op - Operations supported for custom values.
- Engine
Call - A remote call back to the engine during the plugin’s execution.
- Engine
Call Response - The response to an
EngineCall
. The type parameter determines the output type for pipeline data. - Feature
- Indicates optional protocol features. This can help to make non-breaking-change additions to the protocol. Features are not restricted to plain strings and can contain additional configuration data.
- Ordering
- This is just a serializable version of
std::cmp::Ordering
, and can be converted 1:1 - Pipeline
Data Header - The initial (and perhaps only) part of any
nu_protocol::PipelineData
sent over the wire. - Plugin
Call - Calls that a plugin can execute. The type parameter determines the input type.
- Plugin
Call Response - Response to a
PluginCall
. The type parameter determines the output type for pipeline data. - Plugin
Input - Any data sent to the plugin
- Plugin
Option - Options that can be changed to affect how the engine treats the plugin
- Plugin
Output - Information received from the plugin
- Protocol
- Indicates the protocol in use. Only one protocol is supported.
- Stream
Data - A single item of stream data for a stream.
- Stream
Message - A stream control or data message.
Type Aliases§
- Engine
Call Id - A sequential identifier for an
EngineCall
- Plugin
Call Id - A sequential identifier for a
PluginCall
- Stream
Id - A sequential identifier for a stream