[−][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: ProximateShellError
cause: 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][+]
impl Debug for ShellError
[src][+]
impl<'de> Deserialize<'de> for ShellError
[src][+]
impl Display for ShellError
[src][+]
impl Eq for ShellError
[src]
impl Error for ShellError
[src][+]
impl Error for ShellError
[src][+]
impl From<Box<dyn Error + 'static + Sync + Send>> for ShellError
[src][+]
impl From<Box<dyn Error + 'static>> for ShellError
[src][+]
impl From<Error> for ShellError
[src][+]
impl From<Error> for ShellError
[src][+]
impl From<Error> for ShellError
[src][+]
impl From<Error> for ShellError
[src][+]
impl From<FromUtf8Error> for ShellError
[src][+]
impl From<ParseError> for ShellError
[src][+]
fn from(error: ParseError) -> ShellError
[src][−]
impl From<PatternError> for ShellError
[src][+]
impl From<Utf8Error> for ShellError
[src][+]
impl HasFallibleSpan for ShellError
[src][+]
impl Hash for ShellError
[src][+]
impl Ord for ShellError
[src][+]
impl PartialEq<ShellError> for ShellError
[src][+]
impl PartialOrd<ShellError> for ShellError
[src][+]
impl PrettyDebug for ShellError
[src][+]
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][+]
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,
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,
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,
impl<T> PrettyDebugWithSource for T where
T: PrettyDebug,
[src][+]
T: PrettyDebug,
impl<T> SpannedItem for T
[src][+]
impl<T> TaggedItem for T
[src][+]
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
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>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,