[][src]Struct lib_ruby_parser::nodes::IfMod

pub struct IfMod {
    pub cond: Box<Node>,
    pub if_true: Option<Box<Node>>,
    pub if_false: Option<Box<Node>>,
    pub keyword_l: Range,
    pub expression_l: Range,
}

Represents an if/unless modifier (i.e. stmt if cond)

Fields

cond: Box<Node>

Condition of the modifier

if_true: Option<Box<Node>>

True-branch of the modifier.

Always set for if modifier. Always None for unless modifier.

if_false: Option<Box<Node>>

False-branch of the modifier.

Always set for unless modifier. Always None for if modifier.

keyword_l: Range

Location of the if/unless keyword

stmt if cond
     ~~

stmt unless cond
     ~~~~~~
expression_l: Range

Location of the full expression

stmt if cond
~~~~~~~~~~~~

stmt unless cond
~~~~~~~~~~~~~~~~

Trait Implementations

impl Clone for IfMod[src]

impl Debug for IfMod[src]

impl PartialEq<IfMod> for IfMod[src]

impl StructuralPartialEq for IfMod[src]

Auto Trait Implementations

impl !RefUnwindSafe for IfMod

impl !Send for IfMod

impl !Sync for IfMod

impl Unpin for IfMod

impl UnwindSafe for IfMod

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.