#[non_exhaustive]pub enum ErrorKind {
Fail(Error),
Value(Error),
Function(Error),
Scope(Error),
Lexer(Error),
Internal(Error),
Other(Error),
}
Expand description
The different kinds of errors that can be produced by starlark
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fail(Error)
An explicit fail
invocation
Value(Error)
An error approximately associated with a value.
Includes unsupported operations, missing attributes, things of that sort.
Function(Error)
Errors relating to the way a function is called (wrong number of args, etc.)
Scope(Error)
Out of scope variables and similar
Lexer(Error)
Error when lexing a file
Internal(Error)
Indicates a logic bug in starlark
Other(Error)
Fallback option
This is used in two cases:
- For errors produced by starlark which have not yet been assigned their own kind
- When a native function invoked as a part of starlark evaluation returns a
anyhow::Error
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
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