Crate nu_plugin_core
source ·Expand description
Functionality and types shared between the plugin and the engine, other than protocol types.
If you are writing a plugin, you probably don’t need this crate. We will make fewer guarantees
for the stability of the interface of this crate than for nu_plugin.
Modules§
Structs§
- A
PluginEncoderthat enables the plugin to communicate with Nushell with JSON serialized data. - A
PluginEncoderthat enables the plugin to communicate with Nushell with MsgPack serialized data. - A
StreamManagerHandlesupports operations for interacting with theStreamManager. - Receives messages from a stream read from input by a
StreamManager. - Writes messages to a stream, with flow control.
Enums§
- The required streams for communication from the plugin side, i.e. the client in socket terms.
- The type of communication used between the plugin and the engine.
- Enum that supports all of the plugin serialization formats.
- Completes the write operation for a
PipelineData. You must callPipelineDataWriter::write()to write all of the data contained within the streams. - The result of
CommunicationMode::serve(), which acts as an intermediate stage for communication modes that require some kind of socket binding to occur before the client process can be started. Call [.connect()] once the client process has been started. - The required streams for communication from the engine side, i.e. the server in socket terms.
Traits§
- Encoder for a specific message type. Usually implemented on
PluginInputandPluginOutput. - Values that can contain a
ShellErrorto signal an error has occurred. - An interface provides an API for communicating with a plugin or the engine and facilitates stream I/O. See
PluginInterfaceinnu-plugin-enginefor the API from the engine side to a plugin, orEngineInterfaceinnu-pluginfor the API from the plugin side to the engine. - An interface manager handles I/O and state management for communication between a plugin and the engine. See
PluginInterfaceManagerinnu-plugin-enginefor communication from the engine side to a plugin, orEngineInterfaceManagerinnu-pluginfor communication from the plugin side to the engine. - Encoding scheme that defines a plugin’s communication protocol with Nu
- Read input/output from the stream.
- Write input/output to the stream.