ExprElement

Trait ExprElement 

Source
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§

Required Methods§

Source

fn is_negated(&self) -> bool

Source

fn is_relative(&self) -> bool

Source

fn relative_delta(&self) -> i8

Source

fn is_value(&self) -> bool

Source

fn value(&self) -> i32

Source

fn is_char(&self) -> bool

Source

fn char(&self) -> char

Source

fn is_bool(&self) -> bool

Source

fn bool(&self) -> bool

Source

fn is_string(&self) -> bool

Source

fn string(&self) -> &str

Source

fn is_float(&self) -> bool

Source

fn float(&self) -> OrderedFloat<f64>

Source

fn is_list(&self) -> bool

Source

fn list(&self) -> &[Self]

Source

fn is_label(&self) -> bool

Source

fn label(&self) -> &str

Source

fn is_token_operation(&self) -> bool

Source

fn token_operation(&self) -> &UnaryTokenOperation

Source

fn token(&self) -> &Self::Token

Source

fn is_prefix_label(&self) -> bool

Source

fn prefix(&self) -> &LabelPrefix

Source

fn is_binary_operation(&self) -> bool

Source

fn binary_operation(&self) -> BinaryOperation

Source

fn is_unary_operation(&self) -> bool

Source

fn unary_operation(&self) -> UnaryOperation

Source

fn is_unary_function(&self) -> bool

Source

fn unary_function(&self) -> UnaryFunction

Source

fn is_binary_function(&self) -> bool

Source

fn binary_function(&self) -> BinaryFunction

Source

fn is_paren(&self) -> bool

Source

fn is_rnd(&self) -> bool

Source

fn is_any_function(&self) -> bool

Source

fn function_name(&self) -> &str

Source

fn function_args(&self) -> &[Self]

Source

fn arg1(&self) -> &Self

Source

fn arg2(&self) -> &Self

Source

fn neg(&self) -> Self::ResultExpr

Source

fn not(&self) -> Self::ResultExpr

Source

fn add<E>(&self, v: E) -> Self::ResultExpr
where E: Into<Self::ResultExpr>,

Source

fn is_context_independant(&self) -> bool

Source

fn fix_relative_value(&mut self)

Source

fn to_expr(&self) -> Cow<'_, Expr>

Provided Methods§

Source

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.

Implementors§