pub enum BlockItem<'a> {
StatementOrDeclaration(&'a StatementOrDeclaration),
SingleStatement(&'a Statement),
}
Expand description
Wrapper type for StatementOrDeclaration
. Needed because crate::Statement
doesn’t
come under StatementOrDeclaration
in the case of crate::BlockOrSingleStatement
Variants§
StatementOrDeclaration(&'a StatementOrDeclaration)
SingleStatement(&'a Statement)
Trait Implementations§
Source§impl<'a> From<&'a StatementOrDeclaration> for BlockItem<'a>
impl<'a> From<&'a StatementOrDeclaration> for BlockItem<'a>
Source§fn from(item: &'a StatementOrDeclaration) -> Self
fn from(item: &'a StatementOrDeclaration) -> Self
Converts to this type from the input type.
impl SelfVisitable for BlockItem<'_>
Auto Trait Implementations§
impl<'a> Freeze for BlockItem<'a>
impl<'a> RefUnwindSafe for BlockItem<'a>
impl<'a> Send for BlockItem<'a>
impl<'a> Sync for BlockItem<'a>
impl<'a> Unpin for BlockItem<'a>
impl<'a> UnwindSafe for BlockItem<'a>
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