Expand description
Provides functionality for running Nushell plugins from a Nushell engine.
Re-exports§
pub use interface::PluginInterface;
Structs§
- 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. - 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. - The command declaration proxy used within the engine for all plugin commands.
- The execution context of a plugin command. Can be borrowed.
- Plugin garbage collector
- Manages reading and dispatching messages for [
PluginInterface
]s. - The source of a custom value or plugin command. Includes a weak reference to the persistent plugin so it can be retrieved.
Traits§
- Anything that can produce a plugin interface.
- Object safe trait for abstracting operations required of the plugin context.
- Helper trait for adding a source to a
PluginCustomValue
Functions§
- Find
PersistentPlugin
with the givenidentity
in theworking_set
, or construct it if it doesn’t exist. - Spawn the command for a plugin, in the given
mode
. After spawning, it can be passed tomake_plugin_interface()
to get a [PluginInterface
]. - Determine the plugin’s encoding from a freshly opened stream.
- Load the definitions from the plugin file into the engine state
- Load a definition from the plugin file into the engine state
- Create a plugin interface from a spawned child process.
- Create a plugin interface from low-level components.