pub struct SwitchCase {
pub value: u64,
pub dest: BlockCall,
}Expand description
One case of a Terminator::Switch.
§Examples
use ir_lang::{Block, BlockCall, SwitchCase};
let c = SwitchCase { value: 7, dest: BlockCall::new(Block::from_u32(1), &[]) };
assert_eq!(c.value, 7);Fields§
§value: u64The matched value, as bits masked to the scrutinee’s width.
dest: BlockCallWhere control goes when the scrutinee equals value.
Trait Implementations§
Source§impl Clone for SwitchCase
impl Clone for SwitchCase
Source§impl Debug for SwitchCase
impl Debug for SwitchCase
impl Eq for SwitchCase
Source§impl Hash for SwitchCase
impl Hash for SwitchCase
Source§impl PartialEq for SwitchCase
impl PartialEq for SwitchCase
impl StructuralPartialEq for SwitchCase
Auto Trait Implementations§
impl Freeze for SwitchCase
impl RefUnwindSafe for SwitchCase
impl Send for SwitchCase
impl Sync for SwitchCase
impl Unpin for SwitchCase
impl UnsafeUnpin for SwitchCase
impl UnwindSafe for SwitchCase
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