pub enum LogicError {
ParseError {
reason: String,
},
VariableError {
path: String,
reason: String,
},
OperatorNotFoundError {
operator: String,
},
NaNError,
InvalidArgumentsError,
ThrownError {
type: String,
},
Custom(String),
}
Expand description
Errors that can occur during logic operations.
Variants§
ParseError
Error parsing a logic expression from JSON.
VariableError
Error accessing a variable.
Fields
OperatorNotFoundError
Error indicating that an operator is not found.
NaNError
InvalidArgumentsError
ThrownError
Error thrown by the throw operator.
Custom(String)
A custom error with a message.
Implementations§
Source§impl LogicError
impl LogicError
Sourcepub fn parse_error(reason: impl Into<String>) -> Self
pub fn parse_error(reason: impl Into<String>) -> Self
Creates a parse error with the given reason.
Sourcepub fn variable_error(
path: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn variable_error( path: impl Into<String>, reason: impl Into<String>, ) -> Self
Creates a variable error with the given path and reason.
Sourcepub fn thrown_error(type: impl Into<String>) -> Self
pub fn thrown_error(type: impl Into<String>) -> Self
Creates a thrown error with the given type.
Trait Implementations§
Source§impl Clone for LogicError
impl Clone for LogicError
Source§fn clone(&self) -> LogicError
fn clone(&self) -> LogicError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LogicError
impl Debug for LogicError
Source§impl Display for LogicError
impl Display for LogicError
Source§impl Error for LogicError
impl Error for LogicError
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 PartialEq for LogicError
impl PartialEq for LogicError
impl StructuralPartialEq for LogicError
Auto Trait Implementations§
impl Freeze for LogicError
impl RefUnwindSafe for LogicError
impl Send for LogicError
impl Sync for LogicError
impl Unpin for LogicError
impl UnwindSafe for LogicError
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