Skip to main content

Crate nu_plugin_engine

Crate nu_plugin_engine 

Source
Expand description

Provides functionality for running Nushell plugins from a Nushell engine.

Structs§

PersistentPlugin
A box that can keep a plugin that was spawned persistent for further uses. The plugin may or may not be currently running. .get() gets the currently running plugin, or spawns it if it’s not running.
PluginCustomValueWithSource
Wraps a PluginCustomValue together with its PluginSource, so that the CustomValue methods can be implemented by calling the plugin, and to ensure that any custom values sent to a plugin came from it originally.
PluginDeclaration
The command declaration proxy used within the engine for all plugin commands.
PluginExecutionCommandContext
The execution context of a plugin command. Can be borrowed.
PluginGc
Plugin garbage collector
PluginInterfaceManager
Manages reading and dispatching messages for [PluginInterface]s.
PluginSource
The source of a custom value or plugin command. Includes a weak reference to the persistent plugin so it can be retrieved.

Traits§

GetPlugin
Anything that can produce a plugin interface.
PluginExecutionContext
Object safe trait for abstracting operations required of the plugin context.
WithSource
Helper trait for adding a source to a PluginCustomValue

Functions§

add_plugin_to_working_set
Find PersistentPlugin with the given identity in the working_set, or construct it if it doesn’t exist.
create_command
Spawn the command for a plugin, in the given mode. After spawning, it can be passed to make_plugin_interface() to get a [PluginInterface].
get_plugin_encoding
Determine the plugin’s encoding from a freshly opened stream.
load_plugin_file
Load the definitions from the plugin file into the engine state
load_plugin_registry_item
Load a definition from the plugin file into the engine state
make_plugin_interface
Create a plugin interface from a spawned child process.
make_plugin_interface_with_streams
Create a plugin interface from low-level components.