pub struct Error {
pub kind: ErrorKind,
/* private fields */
}
Fields§
§kind: ErrorKind
Implementations§
Source§impl Error
impl Error
Sourcepub fn with_span(self, span: Span) -> Self
pub fn with_span(self, span: Span) -> Self
Adds a [struct Span] to this Error, if there isn’t already a more specific one.
pub fn kind(&self) -> &ErrorKind
Sourcepub fn StackUnderflow() -> Self
pub fn StackUnderflow() -> Self
Underflowed the stack
Sourcepub fn StackOverflow(place: Place) -> Self
pub fn StackOverflow(place: Place) -> Self
Overflowed the stack
Sourcepub fn NotIterable() -> Self
pub fn NotIterable() -> Self
In clause of For loop didn’t yield a Range
Sourcepub fn NotIndexable() -> Self
pub fn NotIndexable() -> Self
A value could not be indexed
Sourcepub fn NotAssignable() -> Self
pub fn NotAssignable() -> Self
An expression is not assignable
Sourcepub fn NotDefined(name: Sym) -> Self
pub fn NotDefined(name: Sym) -> Self
A name was not defined in scope before being used
Sourcepub fn NotInitialized(name: Sym) -> Self
pub fn NotInitialized(name: Sym) -> Self
A name was defined but not initialized
Sourcepub fn NotCallable(value: ConValue) -> Self
pub fn NotCallable(value: ConValue) -> Self
A value was called, but is not callable
Sourcepub fn ArgNumber(want: usize, got: usize) -> Self
pub fn ArgNumber(want: usize, got: usize) -> Self
A function was called with the wrong number of arguments
Sourcepub fn MatchNonexhaustive() -> Self
pub fn MatchNonexhaustive() -> Self
Fell through a non-exhaustive match
Sourcepub fn BuiltinError(msg: String) -> Self
pub fn BuiltinError(msg: String) -> Self
Error produced by a Builtin
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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