Struct resast::stmt::SwitchCase
source · [−]pub struct SwitchCase<'a> {
pub test: Option<Expr<'a>>,
pub consequent: Vec<ProgramPart<'a>>,
}
Expand description
A single case part of a switch statement
Fields
test: Option<Expr<'a>>
consequent: Vec<ProgramPart<'a>>
Trait Implementations
sourceimpl<'a> Clone for SwitchCase<'a>
impl<'a> Clone for SwitchCase<'a>
sourcefn clone(&self) -> SwitchCase<'a>
fn clone(&self) -> SwitchCase<'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 SwitchCase<'a>
impl<'a> Debug for SwitchCase<'a>
sourceimpl<'a> From<SwitchCase<'a>> for SwitchCase<'a>
impl<'a> From<SwitchCase<'a>> for SwitchCase<'a>
sourcefn from(other: SwitchCase<'a>) -> Self
fn from(other: SwitchCase<'a>) -> Self
Converts to this type from the input type.
sourceimpl<'a> PartialEq<SwitchCase<'a>> for SwitchCase<'a>
impl<'a> PartialEq<SwitchCase<'a>> for SwitchCase<'a>
sourcefn eq(&self, other: &SwitchCase<'a>) -> bool
fn eq(&self, other: &SwitchCase<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl<'a> StructuralPartialEq for SwitchCase<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for SwitchCase<'a>
impl<'a> Send for SwitchCase<'a>
impl<'a> Sync for SwitchCase<'a>
impl<'a> Unpin for SwitchCase<'a>
impl<'a> UnwindSafe for SwitchCase<'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