Struct rhai::ConditionalExpr
source · pub struct ConditionalExpr {
pub condition: Expr,
pub expr: Expr,
}
Expand description
An expression with a condition.
The condition may simply be Expr::BoolConstant
with true
if there is actually no condition.
Fields§
§condition: Expr
Condition.
expr: Expr
Expression.
Implementations§
source§impl ConditionalExpr
impl ConditionalExpr
sourcepub const fn is_always_true(&self) -> bool
pub const fn is_always_true(&self) -> bool
Is the condition always true
?
sourcepub const fn is_always_false(&self) -> bool
pub const fn is_always_false(&self) -> bool
Is the condition always false
?
Trait Implementations§
source§impl Clone for ConditionalExpr
impl Clone for ConditionalExpr
source§fn clone(&self) -> ConditionalExpr
fn clone(&self) -> ConditionalExpr
Returns a copy 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 ConditionalExpr
impl Debug for ConditionalExpr
source§impl Default for ConditionalExpr
impl Default for ConditionalExpr
source§fn default() -> ConditionalExpr
fn default() -> ConditionalExpr
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ConditionalExpr
impl !Send for ConditionalExpr
impl !Sync for ConditionalExpr
impl Unpin for ConditionalExpr
impl !UnwindSafe for ConditionalExpr
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