[−][src]Struct lib_ruby_parser::nodes::Case
Represents a case
statement (for pattern matching see CaseMatch
node)
Fields
expr: Option<Node>
Expression given to case
, Int("1")
for case 1; end
None
for code like
case
when pattern
end
when_bodies: Vec<Node>
A list of When
nodes (each has patterns
and body
)
else_body: Option<Node>
Body of the else
branch, None
if there's no else
branch
keyword_l: Range
Location of the case
keyword
case 1; end
~~~~
else_l: Option<Range>
Location of the else
keyword
case 1; else; end
~~~~
None
if there's no else
branch
end_l: Range
Location of the end
keyword
case 1; end
~~~
expression_l: Range
Location of the full expression
case 1; end
~~~~~~~~~~~
Trait Implementations
impl Clone for Case
[src]
impl Debug for Case
[src]
impl PartialEq<Case> for Case
[src]
impl StructuralPartialEq for Case
[src]
Auto Trait Implementations
impl RefUnwindSafe for Case
impl Send for Case
impl Sync for Case
impl Unpin for Case
impl UnwindSafe for Case
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,