Enum kconfig_parser::ast::structs::Expr
source · pub enum Expr {
Sym(String),
Eq(BTreeSet<Expr>),
Ne(BTreeSet<Expr>),
Lt(BTreeSet<Expr>),
Gt(BTreeSet<Expr>),
Lte(BTreeSet<Expr>),
Gte(BTreeSet<Expr>),
And(BTreeSet<Expr>),
Or(BTreeSet<Expr>),
Sub(Box<Expr>),
Not(Box<Expr>),
}
Expand description
An expression can be a symbol, a comparison expression, a negation, a subexpression (with parentheses) and an ‘bitwise and’ or ‘bitwise or’ expression. It can also be a macro resulting into a valid value.
Variants
Sym(String)
Eq(BTreeSet<Expr>)
Ne(BTreeSet<Expr>)
Lt(BTreeSet<Expr>)
Gt(BTreeSet<Expr>)
Lte(BTreeSet<Expr>)
Gte(BTreeSet<Expr>)
And(BTreeSet<Expr>)
Or(BTreeSet<Expr>)
Sub(Box<Expr>)
Not(Box<Expr>)
Implementations
sourceimpl Expr
impl Expr
pub fn is_sym(&self) -> bool
pub fn is_not(&self) -> bool
pub fn is_sub(&self) -> bool
pub fn is_comparison(&self) -> bool
pub fn contains(&self, expr: &Expr) -> bool
pub fn is_eq(&self) -> bool
pub fn is_ne(&self) -> bool
pub fn is_lt(&self) -> bool
pub fn is_gt(&self) -> bool
pub fn is_gte(&self) -> bool
pub fn is_lte(&self) -> bool
pub fn is_and(&self) -> bool
pub fn is_or(&self) -> bool
pub fn get_sym(&self) -> Option<String>
pub fn get_not_expr(&self) -> Option<Expr>
pub fn get_sub_expr(&self) -> Option<Expr>
pub fn len(&self) -> usize
Trait Implementations
sourceimpl IntoIterator for Expr
impl IntoIterator for Expr
sourceimpl Ord for Expr
impl Ord for Expr
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Expr> for Expr
impl PartialOrd<Expr> for Expr
sourcefn partial_cmp(&self, other: &Expr) -> Option<Ordering>
fn partial_cmp(&self, other: &Expr) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Expr
impl StructuralEq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more