pub struct TypedSwitchCase {
pub values: Vec<TypedSwitchValue>,
pub body: StmtId,
pub span: Span,
}Expand description
Multiple entries in values when consecutive case labels share a body.
body is wrapped in NarrowRegion by the inferer for discriminated unions.
Fields§
§values: Vec<TypedSwitchValue>§body: StmtId§span: SpanImplementations§
Source§impl TypedSwitchCase
impl TypedSwitchCase
Sourcepub fn label_comparisons(&self) -> impl Iterator<Item = ExprId> + '_
pub fn label_comparisons(&self) -> impl Iterator<Item = ExprId> + '_
The run-time comparisons of the clause’s labels that aren’t literals, which run before any clause body does.
Trait Implementations§
Source§impl Clone for TypedSwitchCase
impl Clone for TypedSwitchCase
Source§impl Debug for TypedSwitchCase
impl Debug for TypedSwitchCase
Source§impl PartialEq for TypedSwitchCase
impl PartialEq for TypedSwitchCase
impl StructuralPartialEq for TypedSwitchCase
Auto Trait Implementations§
impl Freeze for TypedSwitchCase
impl RefUnwindSafe for TypedSwitchCase
impl Send for TypedSwitchCase
impl Sync for TypedSwitchCase
impl Unpin for TypedSwitchCase
impl UnsafeUnpin for TypedSwitchCase
impl UnwindSafe for TypedSwitchCase
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