pub enum Error {
Show 24 variants
UnexpectedSyntaxNode {
expected: &'static str,
actual: &'static str,
location: Point,
relevant_source: String,
},
AssertEqualFailed {
expected: Value,
actual: Value,
},
AssertFailed,
WrongColumnAmount {
expected: usize,
actual: usize,
},
ExpectedOperatorArgumentAmount {
expected: usize,
actual: usize,
},
ExpectedToolArgumentAmount {
tool_name: &'static str,
expected: usize,
actual: usize,
},
ExpectedAtLeastFunctionArgumentAmount {
identifier: String,
minimum: usize,
actual: usize,
},
ExpectedString {
actual: Value,
},
ExpectedInt {
actual: Value,
},
ExpectedFloat {
actual: Value,
},
ExpectedNumber {
actual: Value,
},
ExpectedNumberOrString {
actual: Value,
},
ExpectedBoolean {
actual: Value,
},
ExpectedList {
actual: Value,
},
ExpectedFixedLenList {
expected_len: usize,
actual: Value,
},
ExpectedEmpty {
actual: Value,
},
ExpectedMap {
actual: Value,
},
ExpectedTable {
actual: Value,
},
ExpectedFunction {
actual: Value,
},
ExpectedCollection {
actual: Value,
},
VariableIdentifierNotFound(String),
FunctionIdentifierNotFound(Identifier),
ToolFailure(String),
CustomMessage(String),
}Variants§
UnexpectedSyntaxNode
AssertEqualFailed
The ‘assert’ macro did not resolve successfully.
AssertFailed
The ‘assert’ macro did not resolve successfully.
WrongColumnAmount
A row was inserted to a table with the wrong amount of values.
ExpectedOperatorArgumentAmount
An operator was called with the wrong amount of arguments.
ExpectedToolArgumentAmount
A function was called with the wrong amount of arguments.
ExpectedAtLeastFunctionArgumentAmount
A function was called with the wrong amount of arguments.
ExpectedString
ExpectedInt
ExpectedFloat
ExpectedNumber
An integer, floating point or value was expected.
ExpectedNumberOrString
An integer, floating point or string value was expected.
ExpectedBoolean
ExpectedList
ExpectedFixedLenList
ExpectedEmpty
ExpectedMap
ExpectedTable
ExpectedFunction
ExpectedCollection
A string, list, map or table value was expected.
VariableIdentifierNotFound(String)
A VariableIdentifier operation did not find its value in the context.
FunctionIdentifierNotFound(Identifier)
A FunctionIdentifier operation did not find its value in the context.
ToolFailure(String)
The function failed due to an external error.
CustomMessage(String)
A custom error explained by its message.
Implementations§
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)>
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<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
source§fn from(value: FromUtf8Error) -> Self
fn from(value: FromUtf8Error) -> Self
Converts to this type from the input type.
source§impl From<SystemTimeError> for Error
impl From<SystemTimeError> for Error
source§fn from(value: SystemTimeError) -> Self
fn from(value: SystemTimeError) -> Self
Converts to this type from the input type.
source§impl PartialEq for Error
impl PartialEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
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