Enum nu_protocol::ShellError
source · [−]pub enum ShellError {
Show 65 variants
OperatorMismatch {
op_span: Span,
lhs_ty: Type,
lhs_span: Span,
rhs_ty: Type,
rhs_span: Span,
},
OperatorOverflow(String, Span),
PipelineMismatch(String, Span, Span),
TypeMismatch(String, Span),
UnsupportedOperator(Operator, Span),
UnknownOperator(String, Span),
MissingParameter(String, Span),
IncompatibleParameters {
left_message: String,
left_span: Span,
right_message: String,
right_span: Span,
},
DelimiterError(String, Span),
IncompatibleParametersSingle(String, Span),
FeatureNotEnabled(Span),
ExternalNotSupported(Span),
InvalidProbability(Span),
InvalidRange(String, String, Span),
NushellFailed(String),
NushellFailedSpanned(String, String, Span),
VariableNotFoundAtRuntime(Span),
EnvVarNotFoundAtRuntime(String, Span),
NotFound(Span),
CantConvert(String, String, Span),
EnvVarNotAString(String, Span),
DivisionByZero(Span),
CannotCreateRange(Span),
AccessBeyondEnd(usize, Span),
AccessBeyondEndOfStream(Span),
IncompatiblePathAccess(String, Span),
CantFindColumn(Span, Span),
ColumnAlreadyExists(Span, Span),
NotAList(Span, Span),
ExternalCommand(String, String, Span),
UnsupportedInput(String, Span),
DatetimeParseError(Span),
NetworkFailure(String, Span),
CommandNotFound(Span),
FlagNotFound(String, Span),
FileNotFound(Span),
FileNotFoundCustom(String, Span),
PluginFailedToLoad(String),
PluginFailedToEncode(String),
PluginFailedToDecode(String),
IOError(String),
NotADirectory(Span),
DirectoryNotFound(Span),
DirectoryNotFoundCustom(String, Span),
DirectoryNotFoundHelp(Span, String),
MoveNotPossible {
source_message: String,
source_span: Span,
destination_message: String,
destination_span: Span,
},
MoveNotPossibleSingle(String, Span),
CreateNotPossible(String, Span),
RemoveNotPossible(String, Span),
NoFileToBeRemoved(),
NoFileToBeMoved(),
NoFileToBeCopied(),
DidYouMean(String, Span),
NonUtf8(Span),
DowncastNotPossible(String, Span),
UnsupportedConfigValue(String, String, Span),
MissingConfigValue(String, Span),
NeedsPositiveValue(Span),
SpannedLabeledError(String, String, Span),
SpannedLabeledErrorHelp(String, String, Span, String),
SpannedLabeledErrorRelated(String, String, Span, Vec<ShellError>),
LabeledError(String, String),
UnlabeledError(String),
OutsideSpannedLabeledError(String, String, String, Span),
DeprecatedCommand(String, String, Span),
}
Expand description
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.
Variants
OperatorMismatch
OperatorOverflow(String, Span)
PipelineMismatch(String, Span, Span)
TypeMismatch(String, Span)
UnsupportedOperator(Operator, Span)
UnknownOperator(String, Span)
MissingParameter(String, Span)
IncompatibleParameters
DelimiterError(String, Span)
IncompatibleParametersSingle(String, Span)
FeatureNotEnabled(Span)
ExternalNotSupported(Span)
InvalidProbability(Span)
InvalidRange(String, String, Span)
NushellFailed(String)
NushellFailedSpanned(String, String, Span)
VariableNotFoundAtRuntime(Span)
EnvVarNotFoundAtRuntime(String, Span)
NotFound(Span)
CantConvert(String, String, Span)
EnvVarNotAString(String, Span)
DivisionByZero(Span)
CannotCreateRange(Span)
AccessBeyondEnd(usize, Span)
AccessBeyondEndOfStream(Span)
IncompatiblePathAccess(String, Span)
CantFindColumn(Span, Span)
ColumnAlreadyExists(Span, Span)
NotAList(Span, Span)
ExternalCommand(String, String, Span)
UnsupportedInput(String, Span)
DatetimeParseError(Span)
NetworkFailure(String, Span)
CommandNotFound(Span)
FlagNotFound(String, Span)
FileNotFound(Span)
FileNotFoundCustom(String, Span)
PluginFailedToLoad(String)
PluginFailedToEncode(String)
PluginFailedToDecode(String)
IOError(String)
NotADirectory(Span)
DirectoryNotFound(Span)
DirectoryNotFoundCustom(String, Span)
DirectoryNotFoundHelp(Span, String)
MoveNotPossible
MoveNotPossibleSingle(String, Span)
CreateNotPossible(String, Span)
RemoveNotPossible(String, Span)
NoFileToBeRemoved()
NoFileToBeMoved()
NoFileToBeCopied()
DidYouMean(String, Span)
NonUtf8(Span)
DowncastNotPossible(String, Span)
UnsupportedConfigValue(String, String, Span)
MissingConfigValue(String, Span)
NeedsPositiveValue(Span)
SpannedLabeledError(String, String, Span)
SpannedLabeledErrorHelp(String, String, Span, String)
SpannedLabeledErrorRelated(String, String, Span, Vec<ShellError>)
LabeledError(String, String)
UnlabeledError(String)
OutsideSpannedLabeledError(String, String, String, Span)
DeprecatedCommand(String, String, Span)
Trait Implementations
sourceimpl Clone for ShellError
impl Clone for ShellError
sourcefn clone(&self) -> ShellError
fn clone(&self) -> ShellError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ShellError
impl Debug for ShellError
sourceimpl<'de> Deserialize<'de> for ShellError
impl<'de> Deserialize<'de> for ShellError
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Diagnostic for ShellError
impl Diagnostic for ShellError
sourcefn code<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn code<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Unique diagnostic code that can be used to look up more information
about this Diagnostic
. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz
) is recommended, but more classic codes like
E0123
or enums will work just fine. Read more
sourcefn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Additional help text related to this Diagnostic
. Do you have any
advice for the poor soul who’s just run into this issue? Read more
sourcefn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan>>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan>>>
Labels to apply to this Diagnostic
’s Diagnostic::source_code
sourcefn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Source code to apply this Diagnostic
’s Diagnostic::labels
to.
Additional related Diagnostic
s.
sourceimpl Display for ShellError
impl Display for ShellError
sourceimpl Error for ShellError
impl Error for ShellError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Box<dyn Error + 'static, Global>> for ShellError
impl From<Box<dyn Error + 'static, Global>> for ShellError
sourcefn from(input: Box<dyn Error>) -> ShellError
fn from(input: Box<dyn Error>) -> ShellError
Converts to this type from the input type.
sourceimpl From<Error> for ShellError
impl From<Error> for ShellError
sourcefn from(input: Error) -> ShellError
fn from(input: Error) -> ShellError
Converts to this type from the input type.
sourceimpl Serialize for ShellError
impl Serialize for ShellError
Auto Trait Implementations
impl RefUnwindSafe for ShellError
impl Send for ShellError
impl Sync for ShellError
impl Unpin for ShellError
impl UnwindSafe for ShellError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more