pub enum ConversionError {
FunctionCall(FunctionCall),
Var(Var),
UnaryExpression {
operator: Token,
expression: Pointer<Expression>,
},
BinaryExpression {
left: Pointer<Expression>,
operator: Token,
right: Pointer<Expression>,
},
}Expand description
Possible errors converting from an expression to a type definition.
Variants§
FunctionCall(FunctionCall)
Function calls can’t be converted to types since the parser won’t look for the variable and thus can’t get it’s return type.
Var(Var)
Variables calls can’t be converted to types since the parser won’t look for them.
UnaryExpression
Unary expressions require metatables. If you wish to just use the value of the expression, pass the inner one and not the unary.
Fields
§
expression: Pointer<Expression>The actual expression this operator is affecting.
BinaryExpression
Binary expressions require metatables. If you wish to just use the value of the expression, pass the inner one and not the binary.
Fields
§
left: Pointer<Expression>The left expression.
§
right: Pointer<Expression>The right expression.
Trait Implementations§
Source§impl Clone for ConversionError
impl Clone for ConversionError
Source§fn clone(&self) -> ConversionError
fn clone(&self) -> ConversionError
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 ConversionError
impl Debug for ConversionError
Source§impl GetRange for ConversionError
impl GetRange for ConversionError
Source§impl Hash for ConversionError
impl Hash for ConversionError
Source§impl Ord for ConversionError
impl Ord for ConversionError
Source§fn cmp(&self, other: &ConversionError) -> Ordering
fn cmp(&self, other: &ConversionError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ConversionError
impl PartialEq for ConversionError
Source§impl PartialOrd for ConversionError
impl PartialOrd for ConversionError
Source§impl Print for ConversionError
impl Print for ConversionError
Source§fn print_final_trivia(&self) -> String
fn print_final_trivia(&self) -> String
Prints only the very final trivia. Used for the default implementation of
Print::print, which just joins Print::print_without_final_trivia
and this function.Source§fn print_without_final_trivia(&self) -> String
fn print_without_final_trivia(&self) -> String
Prints the whole token including all surrounding trivia, excluding the
very last trailing trivia.
impl Eq for ConversionError
impl StructuralPartialEq for ConversionError
Auto Trait Implementations§
impl Freeze for ConversionError
impl RefUnwindSafe for ConversionError
impl !Send for ConversionError
impl !Sync for ConversionError
impl Unpin for ConversionError
impl UnwindSafe for ConversionError
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