Struct nu_errors::ShellError [−][src]
pub struct ShellError {
pub error: ProximateShellError,
pub notes: Vec<String>,
}Expand description
A ShellError is a proximate error and a possible cause, which could have its own cause,
creating a cause chain.
Fields
error: ProximateShellErrornotes: Vec<String>Implementations
pub fn type_error(
expected: impl Into<String>,
actual: Spanned<impl Into<String>>
) -> ShellError
pub fn type_error(
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
pub fn invalid_integer_index(
subpath: Spanned<impl Into<String>>,
integer: impl Into<Span>
) -> ShellError
pub fn range_error(
expected: impl Into<ExpectedRange>,
actual: &Spanned<impl Debug>,
operation: impl Into<String>
) -> ShellError
pub fn coerce_error(
left: Spanned<impl Into<String>>,
right: Spanned<impl Into<String>>
) -> ShellError
pub fn labeled_error(
msg: impl Into<String>,
label: impl Into<String>,
span: impl Into<Span>
) -> ShellError
Trait Implementations
fn 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
Raised when there is general error when deserializing a type. Read more
Raised when a Deserialize receives a type different from what it was
expecting. Read more
Raised when a Deserialize receives a value of the right type but that
is wrong for some other reason. Read more
Raised when deserializing a sequence or map and the input data contains too many or too few elements. Read more
Raised when a Deserialize enum type received a variant with an
unrecognized name. Read more
Raised when a Deserialize struct type received a field with an
unrecognized name. Read more
Raised when a Deserialize struct type expected to receive a required
field with a particular name but that field was not present in the
input. Read more
Raised when a Deserialize struct type received more than one of the
same field. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
PrettyDebug is for internal debugging. For user-facing debugging, into_diagnostic
is used, which prints an error, highlighting spans.
A convenience method that prints out the document without colors in 70 columns. Generally, you should use plain_string or colored_string if possible, but display() can be useful for trace lines and things like that, where you don’t have control over the terminal. Read more
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
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.