pub struct CaseRange {
pub low: i128,
pub high: i128,
}Expand description
The values one case label matches.
A plain case k: is the range k..=k; GNU’s case low ... high: is the
whole interval, which code generation emits as one Rust range pattern
rather than as one arm per value — case 0 ... 1000000: is a perfectly
ordinary thing to write.
Fields§
§low: i128The lowest value, already converted to the controlling type.
high: i128The highest, which equals low for a plain label.
Implementations§
Trait Implementations§
impl Copy for CaseRange
impl Eq for CaseRange
impl StructuralPartialEq for CaseRange
Auto Trait Implementations§
impl Freeze for CaseRange
impl RefUnwindSafe for CaseRange
impl Send for CaseRange
impl Sync for CaseRange
impl Unpin for CaseRange
impl UnsafeUnpin for CaseRange
impl UnwindSafe for CaseRange
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