[−][src]Enum evalexpr::error::EvalexprError
Errors used in this crate.
Variants
WrongOperatorArgumentAmount
An operator was called with a wrong amount of arguments.
Fields of WrongOperatorArgumentAmount
WrongFunctionArgumentAmount
A function was called with a wrong amount of arguments.
Fields of WrongFunctionArgumentAmount
ExpectedString
A string value was expected.
Fields of ExpectedString
actual: Value
The actual value.
ExpectedInt
An integer value was expected.
Fields of ExpectedInt
actual: Value
The actual value.
ExpectedFloat
A float value was expected.
Fields of ExpectedFloat
actual: Value
The actual value.
ExpectedNumber
A numeric value was expected.
Numeric values are the variants Value::Int
and Value::Float
.
Fields of ExpectedNumber
actual: Value
The actual value.
ExpectedBoolean
A boolean value was expected.
Fields of ExpectedBoolean
actual: Value
The actual value.
ExpectedTuple
A tuple value was expected.
Fields of ExpectedTuple
actual: Value
The actual value.
EmptyExpression
The given expression is empty
AppendedToLeafNode
Tried to append a child to a leaf node. Leaf nodes cannot have children.
PrecedenceViolation
Tried to append a child to a node such that the precedence of the child is not higher. This error should never occur. If it does, please file a bug report.
VariableIdentifierNotFound(String)
A VariableIdentifier
operation did not find its value in the context.
FunctionIdentifierNotFound(String)
A FunctionIdentifier
operation did not find its value in the context.
TypeError
A value has the wrong type. Only use this if there is no other error that describes the expected and provided types in more detail.
Fields of TypeError
UnmatchedLBrace
An opening brace without a matching closing brace was found.
UnmatchedRBrace
A closing brace without a matching opening brace was found.
UnmatchedPartialToken
A PartialToken
is unmatched, such that it cannot be combined into a full Token
.
This happens if for example a single =
is found, surrounded by whitespace.
It is not a token, but it is part of the string representation of some tokens.
Fields of UnmatchedPartialToken
first: PartialToken
The unmatched partial token.
second: Option<PartialToken>
The token that follows the unmatched partial token and that cannot be matched to the partial token, or None
, if first
is the last partial token in the stream.
AdditionError
An addition operation performed by Rust failed.
Fields of AdditionError
SubtractionError
A subtraction operation performed by Rust failed.
Fields of SubtractionError
NegationError
A negation operation performed by Rust failed.
Fields of NegationError
argument: Value
The argument of the negation.
MultiplicationError
A multiplication operation performed by Rust failed.
Fields of MultiplicationError
DivisionError
A division operation performed by Rust failed.
Fields of DivisionError
ModulationError
A modulation operation performed by Rust failed.
Fields of ModulationError
ContextNotManipulable
A set_
-function was called on a Context
that does not allow modifications.
CustomMessage(String)
A custom error explained by its message.
Methods
impl EvalexprError
[src]
pub fn type_error(actual: Value, expected: TupleType) -> Self
[src]
Constructs Error::TypeError{actual, expected}
.
pub fn expected_string(actual: Value) -> Self
[src]
Constructs Error::ExpectedString(actual)
.
pub fn expected_int(actual: Value) -> Self
[src]
Constructs Error::ExpectedInt(actual)
.
pub fn expected_float(actual: Value) -> Self
[src]
Constructs Error::ExpectedFloat(actual)
.
pub fn expected_number(actual: Value) -> Self
[src]
Constructs Error::ExpectedNumber(actual)
.
pub fn expected_boolean(actual: Value) -> Self
[src]
Constructs Error::ExpectedBoolean(actual)
.
pub fn expected_tuple(actual: Value) -> Self
[src]
Constructs Error::ExpectedTuple(actual)
.
Trait Implementations
impl PartialEq<EvalexprError> for EvalexprError
[src]
fn eq(&self, other: &EvalexprError) -> bool
[src]
fn ne(&self, other: &EvalexprError) -> bool
[src]
impl Debug for EvalexprError
[src]
impl Display for EvalexprError
[src]
impl Error for EvalexprError
[src]
fn description(&self) -> &str
1.0.0[src]
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
replaced by Error::source, which can support downcasting
The lower-level cause of this error, if any. Read more
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
The lower-level source of this error, if any. Read more
Auto Trait Implementations
impl Send for EvalexprError
impl Sync for EvalexprError
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,