pub enum CodeGenError {
UnsupportedFeature(String),
TypeMismatch(String),
InvalidExpression(String),
}Expand description
Errors that can occur during ELO-to-Rust code generation
This enum represents the different kinds of errors that can occur when compiling ELO validation expressions to Rust code.
§Examples
ⓘ
use elo_rust::codegen::CodeGenError;
let err = CodeGenError::UnsupportedFeature("custom functions".to_string());
println!("{}", err); // "Unsupported feature: custom functions"Variants§
UnsupportedFeature(String)
Feature is not yet supported in this implementation
Contains the name of the unsupported feature (e.g., “async validators”, “custom functions”)
TypeMismatch(String)
Type mismatch detected during code generation
This occurs when operands don’t match expected types for an operation. Contains a descriptive message about the mismatch.
InvalidExpression(String)
Invalid or malformed ELO expression
This occurs when the expression cannot be parsed or compiled. Contains details about what makes the expression invalid.
Trait Implementations§
Source§impl Clone for CodeGenError
impl Clone for CodeGenError
Source§fn clone(&self) -> CodeGenError
fn clone(&self) -> CodeGenError
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 CodeGenError
impl Debug for CodeGenError
Source§impl Display for CodeGenError
impl Display for CodeGenError
Source§impl Error for CodeGenError
impl Error for CodeGenError
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 CodeGenError
impl PartialEq for CodeGenError
impl Eq for CodeGenError
impl StructuralPartialEq for CodeGenError
Auto Trait Implementations§
impl Freeze for CodeGenError
impl RefUnwindSafe for CodeGenError
impl Send for CodeGenError
impl Sync for CodeGenError
impl Unpin for CodeGenError
impl UnsafeUnpin for CodeGenError
impl UnwindSafe for CodeGenError
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