pub struct ConditionalExpr {
pub cond: Box<Expr>,
pub question_span: Span,
pub then_expr: Box<Expr>,
pub colon_span: Span,
pub else_expr: Box<Expr>,
}Expand description
Ternary conditional expression: cond ? a : b.
Fields§
§cond: Box<Expr>§question_span: Span§then_expr: Box<Expr>§colon_span: Span§else_expr: Box<Expr>Implementations§
Trait Implementations§
Source§impl Clone for ConditionalExpr
impl Clone for ConditionalExpr
Source§fn clone(&self) -> ConditionalExpr
fn clone(&self) -> ConditionalExpr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Hash for ConditionalExpr
impl Hash for ConditionalExpr
Source§impl PartialEq for ConditionalExpr
impl PartialEq for ConditionalExpr
Source§fn eq(&self, other: &ConditionalExpr) -> bool
fn eq(&self, other: &ConditionalExpr) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ConditionalExpr
impl StructuralPartialEq for ConditionalExpr
Auto Trait Implementations§
impl Freeze for ConditionalExpr
impl RefUnwindSafe for ConditionalExpr
impl Send for ConditionalExpr
impl Sync for ConditionalExpr
impl Unpin for ConditionalExpr
impl UnsafeUnpin 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