Struct lib_ruby_parser::nodes::IfTernary
source · [−]#[repr(C)]pub struct IfTernary {
pub cond: Box<Node>,
pub if_true: Box<Node>,
pub if_false: Box<Node>,
pub question_l: Loc,
pub colon_l: Loc,
pub expression_l: Loc,
}
Expand description
Represents ternary if
statement (i.e. cond ? if_true : if_false
)
Fields
cond: Box<Node>
Condition of the if
statement
if_true: Box<Node>
True-branch
if_false: Box<Node>
True-branch
question_l: Loc
Location of the ?
operator
cond ? if_true : if_false
~
colon_l: Loc
Location of the :
operator
cond ? if_true : if_false
~
expression_l: Loc
Location of the full expression
cond ? if_true : if_false
~~~~~~~~~~~~~~~~~~~~~~~~~
Trait Implementations
impl StructuralPartialEq for IfTernary
Auto Trait Implementations
impl RefUnwindSafe for IfTernary
impl Send for IfTernary
impl Sync for IfTernary
impl Unpin for IfTernary
impl UnwindSafe for IfTernary
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more