Expand description
§nu-protocol
The nu-protocol crate holds the definitions of structs/traits that are used throughout Nushell. This gives us one way to expose them to many other crates, as well as make these definitions available to each other, without causing mutually recursive dependencies.
Re-exports§
pub use ast::Unit;
pub use engine::ENV_VARIABLE_ID;
pub use engine::IN_VARIABLE_ID;
pub use engine::NU_VARIABLE_ID;
pub use config::*;
pub use span::*;
Modules§
- Types representing parsed Nushell code (the Abstract Syntax Tree)
- Module managing the streaming of raw bytes between pipeline elements
- This module manages the step of turning error types into printed error messages
- Module containing the internal representation of user configuration
- Module containing the trait to instrument the engine for debugging and profiling
- Representation of the engine state and many of the details that implement the scoping
- Foundational
Eval
trait allowing dispatch between const-eval and regular evaluation - Implementation of const-evaluation
- Module managing the streaming of individual
Value
s as aListStream
between pipeline elements - Handling of external subprocesses
- Our insertion ordered map-type
Record
Macros§
Structs§
- Command wrapper of an alias.
- A potentially infinite, interruptible stream of bytes.
- Turn a readable stream into
Value
s. - A labeled span within a
LabeledError
. - The signature definition of a named flag that either accepts a value or acts as a toggle flag
- HandlerGuard that unregisters a handler when dropped.
- Manages a collection of handlers.
- Error when an invalid plugin filename was encountered.
- A very generic type of error used for interfacing with external code, such as scripts and plugins.
- A potentially infinite, interruptible stream of
Value
s. - Collection of definitions that can be exported from a module
- Metadata that is valid for the whole
PipelineData
- Metadata about the installed plugin. This is cached in the registry file along with the signatures. None of the metadata fields are required, and more may be added in the future.
- A single plugin definition from a
PluginRegistryFile
. - A simple wrapper for Signature that includes examples.
- The signature definition for a positional argument
- Used to check for signals to suspend or terminate the execution of Nushell code.
- Signature information of a
Command
Enums§
- The source of bytes for a
ByteStream
. - Optional type color for
ByteStream
, which determines type compatibility. - Command categories
- An internal compiler error, generally means a Nushell bug rather than an issue with user error since parsing and typechecking has already passed.
- The errors that may occur when updating the config
- Describes where the particular
PipelineMetadata
originates. - Describes where to direct the stdout or stderr output stream of external command to.
- The foundational abstraction for input and output to commands
- Possibly valid data about a plugin in a
PluginRegistryFile
. If deserialization fails, it will beInvalid
. - The fundamental error type for the evaluation engine. These cases represent different kinds of errors the evaluator might face, along with helpful spans to label. An error renderer will take this error value and pass it into an error viewer to display to the user.
- The types of things that can be signaled. It’s anticipated this will change as we learn more about how we’d like signals to be handled.
- The syntactic shapes that describe how a sequence should be parsed.
- Core structured values that pass through the pipeline in Nushell.
Traits§
- Trait definition for a custom
Value
type - A trait for loading a value from a
Value
. - A trait for converting a value into a
Value
. - Trait for plugins registered in the
EngineState
. - A trait for trying to convert a value into a
Value
.
Functions§
- Finds the Levenshtein distance between two strings.
Type Aliases§
- Handler is a closure that can be sent across threads and shared.
- An ID for an IR register.
Derive Macros§
- Derive macro generating an impl of the trait
FromValue
. - Derive macro generating an impl of the trait
IntoValue
.