pub struct UiuaError {
pub kind: Box<UiuaErrorKind>,
pub meta: Box<ErrorMeta>,
}Expand description
An error produced when running/compiling/formatting a Uiua program
Fields§
§kind: Box<UiuaErrorKind>The kind of error
meta: Box<ErrorMeta>Additional error data
Implementations§
Source§impl UiuaError
impl UiuaError
Sourcepub fn with_info(
self,
info: impl IntoIterator<Item = (String, Option<Span>)>,
) -> Self
pub fn with_info( self, info: impl IntoIterator<Item = (String, Option<Span>)>, ) -> Self
Attach some info to the error
Sourcepub fn into_multi(self) -> Vec<Self>
pub fn into_multi(self) -> Vec<Self>
Turn the error into a multi-error
Sourcepub fn from_multi(multi: impl IntoIterator<Item = Self>) -> Self
pub fn from_multi(multi: impl IntoIterator<Item = Self>) -> Self
Create an error from multiple errors
Trait Implementations§
Source§impl Error for UiuaError
impl Error for UiuaError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Infallible> for UiuaError
impl From<Infallible> for UiuaError
Source§fn from(value: Infallible) -> Self
fn from(value: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<UiuaErrorKind> for UiuaError
impl From<UiuaErrorKind> for UiuaError
Source§fn from(kind: UiuaErrorKind) -> Self
fn from(kind: UiuaErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UiuaError
impl !RefUnwindSafe for UiuaError
impl Send for UiuaError
impl Sync for UiuaError
impl Unpin for UiuaError
impl !UnwindSafe for UiuaError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more