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§
Source§impl Clone for ConditionalOp
impl Clone for ConditionalOp
Source§fn clone(&self) -> ConditionalOp
fn clone(&self) -> ConditionalOp
Returns a duplicate 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 ConditionalOp
impl Debug for ConditionalOp
Source§impl Display for ConditionalOp
impl Display for ConditionalOp
Source§impl Drop for ConditionalOp
impl Drop for ConditionalOp
Source§impl Executable for ConditionalOp
impl Executable for ConditionalOp
Source§impl From<ConditionalOp> for Node
impl From<ConditionalOp> for Node
Source§fn from(cond_op: ConditionalOp) -> Node
fn from(cond_op: ConditionalOp) -> Node
Converts to this type from the input type.
Source§impl PartialEq for ConditionalOp
impl PartialEq for ConditionalOp
Source§impl Trace for ConditionalOp
impl Trace for ConditionalOp
Source§fn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects
impl StructuralPartialEq for ConditionalOp
Auto Trait Implementations§
impl Freeze for ConditionalOp
impl RefUnwindSafe for ConditionalOp
impl !Send for ConditionalOp
impl !Sync for ConditionalOp
impl Unpin for ConditionalOp
impl UnwindSafe for ConditionalOp
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