Struct rhai::ConditionalExpr
source · [−]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
sourceimpl ConditionalExpr
impl ConditionalExpr
sourcepub fn is_always_true(&self) -> bool
pub fn is_always_true(&self) -> bool
Is the condition always true
?
sourcepub fn is_always_false(&self) -> bool
pub fn is_always_false(&self) -> bool
Is the condition always false
?
Trait Implementations
sourceimpl Clone for ConditionalExpr
impl Clone for ConditionalExpr
sourcefn clone(&self) -> ConditionalExpr
fn clone(&self) -> ConditionalExpr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ConditionalExpr
impl Debug for ConditionalExpr
sourceimpl Default for ConditionalExpr
impl Default for ConditionalExpr
sourcefn default() -> ConditionalExpr
fn default() -> ConditionalExpr
Returns the “default value” for a type. Read more
sourceimpl<E: Into<Expr>> From<E> for ConditionalExpr
impl<E: Into<Expr>> From<E> for ConditionalExpr
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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