Struct boa::syntax::ast::node::conditional::conditional_op::ConditionalOp
source · [−]pub struct ConditionalOp { /* private fields */ }
Expand description
The conditional
(ternary) operator is the only JavaScript operator that takes three
operands.
This operator is the only JavaScript operator that takes three operands: a condition
followed by a question mark (?
), then an expression to execute if
the condition is
truthy followed by a colon (:
), and finally the expression to execute if the condition
is false
. This operator is frequently used as a shortcut for the if
statement.
More information:
Implementations
Trait Implementations
sourceimpl Clone for ConditionalOp
impl Clone for ConditionalOp
sourcefn clone(&self) -> ConditionalOp
fn clone(&self) -> ConditionalOp
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 moresourceimpl Debug for ConditionalOp
impl Debug for ConditionalOp
sourceimpl Display for ConditionalOp
impl Display for ConditionalOp
sourceimpl Drop for ConditionalOp
impl Drop for ConditionalOp
sourceimpl Executable for ConditionalOp
impl Executable for ConditionalOp
sourceimpl Finalize for ConditionalOp
impl Finalize for ConditionalOp
sourceimpl From<ConditionalOp> for Node
impl From<ConditionalOp> for Node
sourcefn from(cond_op: ConditionalOp) -> Node
fn from(cond_op: ConditionalOp) -> Node
Converts to this type from the input type.
sourceimpl PartialEq<ConditionalOp> for ConditionalOp
impl PartialEq<ConditionalOp> for ConditionalOp
sourcefn eq(&self, other: &ConditionalOp) -> bool
fn eq(&self, other: &ConditionalOp) -> bool
sourceimpl Trace for ConditionalOp
impl Trace for ConditionalOp
sourcefn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects Read more
impl StructuralPartialEq for ConditionalOp
Auto Trait Implementations
impl RefUnwindSafe for ConditionalOp
impl !Send for ConditionalOp
impl !Sync for ConditionalOp
impl Unpin for ConditionalOp
impl UnwindSafe for ConditionalOp
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