Crate nu_plugin_protocol

Source
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§

ByteStreamInfo
Additional information about byte streams
CallInfo
Information about a plugin command invocation. This includes an EvaluatedCall as a serializable representation of nu_protocol::ast::Call. The type parameter determines the input type.
EvaluatedCall
A representation of the plugin’s invocation command including command line args
ListStreamInfo
Additional information about list (value) streams
PluginCustomValue
An opaque container for a custom value that is handled fully by a plugin.
ProtocolInfo
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§

CustomValueOp
Operations supported for custom values.
EngineCall
A remote call back to the engine during the plugin’s execution.
EngineCallResponse
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
PipelineDataHeader
The initial (and perhaps only) part of any nu_protocol::PipelineData sent over the wire.
PluginCall
Calls that a plugin can execute. The type parameter determines the input type.
PluginCallResponse
Response to a PluginCall. The type parameter determines the output type for pipeline data.
PluginInput
Any data sent to the plugin
PluginOption
Options that can be changed to affect how the engine treats the plugin
PluginOutput
Information received from the plugin
Protocol
Indicates the protocol in use. Only one protocol is supported.
StreamData
A single item of stream data for a stream.
StreamMessage
A stream control or data message.

Type Aliases§

EngineCallId
A sequential identifier for an EngineCall
PluginCallId
A sequential identifier for a PluginCall
StreamId
A sequential identifier for a stream