Expand description
Provides functionality for running Nushell plugins from a Nushell engine.
Structs§
- Persistent
Plugin - 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. - Plugin
Custom Value With Source - Wraps a
PluginCustomValue
together with itsPluginSource
, so that theCustomValue
methods can be implemented by calling the plugin, and to ensure that any custom values sent to a plugin came from it originally. - Plugin
Declaration - The command declaration proxy used within the engine for all plugin commands.
- Plugin
Execution Command Context - The execution context of a plugin command. Can be borrowed.
- Plugin
Gc - Plugin garbage collector
- Plugin
Interface Manager - Manages reading and dispatching messages for [
PluginInterface
]s. - Plugin
Source - 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.
- Plugin
Execution Context - Object safe trait for abstracting operations required of the plugin context.
- With
Source - Helper trait for adding a source to a
PluginCustomValue
Functions§
- add_
plugin_ to_ working_ set - Find
PersistentPlugin
with the givenidentity
in theworking_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 tomake_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.