pub struct ConditionalExpr<'a> {
pub test: Box<Expr<'a>>,
pub question_mark: Slice<'a>,
pub alternate: Box<Expr<'a>>,
pub colon: Slice<'a>,
pub consequent: Box<Expr<'a>>,
}
Expand description
A ternery expression
var a = true ? 'stuff' : 'things';
Fields
test: Box<Expr<'a>>
question_mark: Slice<'a>
alternate: Box<Expr<'a>>
colon: Slice<'a>
consequent: Box<Expr<'a>>
Trait Implementations
sourceimpl<'a> Clone for ConditionalExpr<'a>
impl<'a> Clone for ConditionalExpr<'a>
sourcefn clone(&self) -> ConditionalExpr<'a>
fn clone(&self) -> ConditionalExpr<'a>
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<'a> Debug for ConditionalExpr<'a>
impl<'a> Debug for ConditionalExpr<'a>
sourceimpl<'a> From<ConditionalExpr<'a>> for ConditionalExpr<'a>
impl<'a> From<ConditionalExpr<'a>> for ConditionalExpr<'a>
sourcefn from(other: ConditionalExpr<'a>) -> Self
fn from(other: ConditionalExpr<'a>) -> Self
Converts to this type from the input type.
sourceimpl<'a> Node for ConditionalExpr<'a>
impl<'a> Node for ConditionalExpr<'a>
fn loc(&self) -> SourceLocation
sourceimpl<'a> PartialEq<ConditionalExpr<'a>> for ConditionalExpr<'a>
impl<'a> PartialEq<ConditionalExpr<'a>> for ConditionalExpr<'a>
sourcefn eq(&self, other: &ConditionalExpr<'a>) -> bool
fn eq(&self, other: &ConditionalExpr<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl<'a> StructuralPartialEq for ConditionalExpr<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ConditionalExpr<'a>
impl<'a> Send for ConditionalExpr<'a>
impl<'a> Sync for ConditionalExpr<'a>
impl<'a> Unpin for ConditionalExpr<'a>
impl<'a> UnwindSafe for ConditionalExpr<'a>
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