pub trait ExprElement: Sized {
type ResultExpr: ExprElement;
type Token: ListingElement;
Show 44 methods
// Required methods
fn is_negated(&self) -> bool;
fn is_relative(&self) -> bool;
fn relative_delta(&self) -> i8;
fn is_value(&self) -> bool;
fn value(&self) -> i32;
fn is_char(&self) -> bool;
fn char(&self) -> char;
fn is_bool(&self) -> bool;
fn bool(&self) -> bool;
fn is_string(&self) -> bool;
fn string(&self) -> &str;
fn is_float(&self) -> bool;
fn float(&self) -> OrderedFloat<f64>;
fn is_list(&self) -> bool;
fn list(&self) -> &[Self];
fn is_label(&self) -> bool;
fn label(&self) -> &str;
fn is_token_operation(&self) -> bool;
fn token_operation(&self) -> &UnaryTokenOperation;
fn token(&self) -> &Self::Token;
fn is_prefix_label(&self) -> bool;
fn prefix(&self) -> &LabelPrefix;
fn is_binary_operation(&self) -> bool;
fn binary_operation(&self) -> BinaryOperation;
fn is_unary_operation(&self) -> bool;
fn unary_operation(&self) -> UnaryOperation;
fn is_unary_function(&self) -> bool;
fn unary_function(&self) -> UnaryFunction;
fn is_binary_function(&self) -> bool;
fn binary_function(&self) -> BinaryFunction;
fn is_paren(&self) -> bool;
fn is_rnd(&self) -> bool;
fn is_any_function(&self) -> bool;
fn function_name(&self) -> &str;
fn function_args(&self) -> &[Self];
fn arg1(&self) -> &Self;
fn arg2(&self) -> &Self;
fn neg(&self) -> Self::ResultExpr;
fn not(&self) -> Self::ResultExpr;
fn add<E>(&self, v: E) -> Self::ResultExpr
where E: Into<Self::ResultExpr>;
fn is_context_independant(&self) -> bool;
fn fix_relative_value(&mut self);
fn to_expr(&self) -> Cow<'_, Expr>;
// Provided method
fn is_label_value(&self, label: &str) -> bool { ... }
}Expand description
All methods are unchecked
Required Associated Types§
type ResultExpr: ExprElement
type Token: ListingElement
Required Methods§
fn is_negated(&self) -> bool
fn is_relative(&self) -> bool
fn relative_delta(&self) -> i8
fn is_value(&self) -> bool
fn value(&self) -> i32
fn is_char(&self) -> bool
fn char(&self) -> char
fn is_bool(&self) -> bool
fn bool(&self) -> bool
fn is_string(&self) -> bool
fn string(&self) -> &str
fn is_float(&self) -> bool
fn float(&self) -> OrderedFloat<f64>
fn is_list(&self) -> bool
fn list(&self) -> &[Self]
fn is_label(&self) -> bool
fn label(&self) -> &str
fn is_token_operation(&self) -> bool
fn token_operation(&self) -> &UnaryTokenOperation
fn token(&self) -> &Self::Token
fn is_prefix_label(&self) -> bool
fn prefix(&self) -> &LabelPrefix
fn is_binary_operation(&self) -> bool
fn binary_operation(&self) -> BinaryOperation
fn is_unary_operation(&self) -> bool
fn unary_operation(&self) -> UnaryOperation
fn is_unary_function(&self) -> bool
fn unary_function(&self) -> UnaryFunction
fn is_binary_function(&self) -> bool
fn binary_function(&self) -> BinaryFunction
fn is_paren(&self) -> bool
fn is_rnd(&self) -> bool
fn is_any_function(&self) -> bool
fn function_name(&self) -> &str
fn function_args(&self) -> &[Self]
fn arg1(&self) -> &Self
fn arg2(&self) -> &Self
fn neg(&self) -> Self::ResultExpr
fn not(&self) -> Self::ResultExpr
fn add<E>(&self, v: E) -> Self::ResultExprwhere
E: Into<Self::ResultExpr>,
fn is_context_independant(&self) -> bool
fn fix_relative_value(&mut self)
fn to_expr(&self) -> Cow<'_, Expr>
Provided Methods§
fn is_label_value(&self, label: &str) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.