Struct koto_parser::SwitchArm
source · pub struct SwitchArm {
pub condition: Option<AstIndex>,
pub expression: AstIndex,
}
Expand description
An arm in a switch expression
Fields§
§condition: Option<AstIndex>
An optional condition for the switch arm
None implies else
, and should always appear as the last arm.
expression: AstIndex
The body of the switch arm
Implementations§
Trait Implementations§
source§impl PartialEq for SwitchArm
impl PartialEq for SwitchArm
impl Eq for SwitchArm
impl StructuralPartialEq for SwitchArm
Auto Trait Implementations§
impl Freeze for SwitchArm
impl RefUnwindSafe for SwitchArm
impl Send for SwitchArm
impl Sync for SwitchArm
impl Unpin for SwitchArm
impl UnwindSafe for SwitchArm
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