[−][src]Struct nu_errors::ShellError
A ShellError is a proximate error and a possible cause, which could have its own cause,
creating a cause chain.
Fields
error: ProximateShellErrorcause: Option<Box<ShellError>>Implementations
impl ShellError[src]
pub fn type_error(
expected: impl Into<String>,
actual: Spanned<impl Into<String>>
) -> ShellError[src]
expected: impl Into<String>,
actual: Spanned<impl Into<String>>
) -> ShellError
An error that describes a mismatch between the given type and the expected type
pub fn missing_property(
subpath: Spanned<impl Into<String>>,
expr: Spanned<impl Into<String>>
) -> ShellError[src]
subpath: Spanned<impl Into<String>>,
expr: Spanned<impl Into<String>>
) -> ShellError
pub fn missing_value(
span: impl Into<Option<Span>>,
reason: impl Into<String>
) -> ShellError[src]
span: impl Into<Option<Span>>,
reason: impl Into<String>
) -> ShellError
pub fn invalid_integer_index(
subpath: Spanned<impl Into<String>>,
integer: impl Into<Span>
) -> ShellError[src]
subpath: Spanned<impl Into<String>>,
integer: impl Into<Span>
) -> ShellError
pub fn untagged_runtime_error(error: impl Into<String>) -> ShellError[src]
pub fn unexpected_eof(
expected: impl Into<String>,
span: impl Into<Span>
) -> ShellError[src]
expected: impl Into<String>,
span: impl Into<Span>
) -> ShellError
pub fn range_error(
expected: impl Into<ExpectedRange>,
actual: &Spanned<impl Debug>,
operation: impl Into<String>
) -> ShellError[src]
expected: impl Into<ExpectedRange>,
actual: &Spanned<impl Debug>,
operation: impl Into<String>
) -> ShellError
pub fn syntax_error(problem: Spanned<impl Into<String>>) -> ShellError[src]
pub fn coerce_error(
left: Spanned<impl Into<String>>,
right: Spanned<impl Into<String>>
) -> ShellError[src]
left: Spanned<impl Into<String>>,
right: Spanned<impl Into<String>>
) -> ShellError
pub fn argument_error(
command: Spanned<impl Into<String>>,
kind: ArgumentError
) -> ShellError[src]
command: Spanned<impl Into<String>>,
kind: ArgumentError
) -> ShellError
pub fn diagnostic(diagnostic: Diagnostic<usize>) -> ShellError[src]
pub fn external_non_zero() -> ShellError[src]
pub fn into_diagnostic(self) -> Option<Diagnostic<usize>>[src]
pub fn labeled_error(
msg: impl Into<String>,
label: impl Into<String>,
span: impl Into<Span>
) -> ShellError[src]
msg: impl Into<String>,
label: impl Into<String>,
span: impl Into<Span>
) -> ShellError
pub fn labeled_error_with_secondary(
msg: impl Into<String>,
primary_label: impl Into<String>,
primary_span: impl Into<Span>,
secondary_label: impl Into<String>,
secondary_span: impl Into<Span>
) -> ShellError[src]
msg: impl Into<String>,
primary_label: impl Into<String>,
primary_span: impl Into<Span>,
secondary_label: impl Into<String>,
secondary_span: impl Into<Span>
) -> ShellError
pub fn unimplemented(title: impl Into<String>) -> ShellError[src]
pub fn unexpected(title: impl Into<String>) -> ShellError[src]
Trait Implementations
impl Clone for ShellError[src]
fn clone(&self) -> ShellError[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for ShellError[src]
impl<'de> Deserialize<'de> for ShellError[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl Display for ShellError[src]
impl Eq for ShellError[src]
impl Error for ShellError[src]
fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>[src]
fn description(&self) -> &str1.0.0[src]
fn cause(&self) -> Option<&dyn Error>1.0.0[src]
impl Error for ShellError[src]
fn custom<T>(msg: T) -> Self where
T: Display, [src]
T: Display,
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self[src]
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self[src]
fn invalid_length(len: usize, exp: &dyn Expected) -> Self[src]
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self[src]
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self[src]
fn missing_field(field: &'static str) -> Self[src]
fn duplicate_field(field: &'static str) -> Self[src]
impl From<Box<dyn Error + 'static + Send + Sync>> for ShellError[src]
impl From<Box<dyn Error + 'static>> for ShellError[src]
fn from(input: Box<dyn Error>) -> ShellError[src]
impl From<Error> for ShellError[src]
fn from(input: Error) -> ShellError[src]
impl From<Error> for ShellError[src]
fn from(input: Error) -> ShellError[src]
impl From<Error> for ShellError[src]
fn from(input: Error) -> ShellError[src]
impl From<Error> for ShellError[src]
fn from(input: Error) -> ShellError[src]
impl From<FromUtf8Error> for ShellError[src]
fn from(input: FromUtf8Error) -> ShellError[src]
impl From<ParseError> for ShellError[src]
Convert a ParseError into a ShellError
fn from(error: ParseError) -> ShellError[src]
impl From<PatternError> for ShellError[src]
fn from(input: PatternError) -> ShellError[src]
impl From<Utf8Error> for ShellError[src]
fn from(input: Utf8Error) -> ShellError[src]
impl HasFallibleSpan for ShellError[src]
fn maybe_span(&self) -> Option<Span>[src]
impl Hash for ShellError[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Ord for ShellError[src]
fn cmp(&self, other: &ShellError) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl PartialEq<ShellError> for ShellError[src]
fn eq(&self, other: &ShellError) -> bool[src]
fn ne(&self, other: &ShellError) -> bool[src]
impl PartialOrd<ShellError> for ShellError[src]
fn partial_cmp(&self, other: &ShellError) -> Option<Ordering>[src]
fn lt(&self, other: &ShellError) -> bool[src]
fn le(&self, other: &ShellError) -> bool[src]
fn gt(&self, other: &ShellError) -> bool[src]
fn ge(&self, other: &ShellError) -> bool[src]
impl PrettyDebug for ShellError[src]
PrettyDebug is for internal debugging. For user-facing debugging, into_diagnostic
is used, which prints an error, highlighting spans.
fn pretty(&self) -> DebugDocBuilder[src]
fn to_doc(&self) -> DebugDoc[src]
fn pretty_doc(
&self
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>[src]
&self
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
fn pretty_builder(&self) -> DocBuilder<'static, BoxAllocator, ShellAnnotation>[src]
fn display(&self) -> String[src]
fn plain_string(&self, width: usize) -> String[src]
fn colored_string(&self, width: usize) -> String[src]
impl Serialize for ShellError[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl StructuralEq for ShellError[src]
impl StructuralPartialEq for ShellError[src]
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T> HasFallibleSpan for T where
T: HasSpan, [src]
T: HasSpan,
pub fn maybe_span(&self) -> Option<Span>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> IntoSpanned for T where
T: HasFallibleSpan, [src]
T: HasFallibleSpan,
type Output = T
pub fn into_spanned(self, _span: impl Into<Span>) -> <T as IntoSpanned>::Output[src]
impl<T> PrettyDebugWithSource for T where
T: PrettyDebug, [src]
T: PrettyDebug,
pub fn pretty_debug(&self, _source: &str) -> DebugDocBuilder[src]
fn refined_pretty_debug(
&self,
_refine: PrettyDebugRefineKind,
source: &str
) -> DebugDocBuilder[src]
&self,
_refine: PrettyDebugRefineKind,
source: &str
) -> DebugDocBuilder
fn debug(&self, source: impl Into<Text>) -> String where
Self: Clone, [src]
Self: Clone,
fn debuggable(self, source: impl Into<Text>) -> DebuggableWithSource<Self>[src]
impl<T> SpannedItem for T[src]
fn spanned(self, span: impl Into<Span>) -> Spanned<Self>[src]
fn spanned_unknown(self) -> Spanned<Self>[src]
impl<T> TaggedItem for T[src]
fn tagged(self, tag: impl Into<Tag>) -> Tagged<Self>[src]
fn tagged_unknown(self) -> Tagged<Self>[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,