pub enum MatchExpand<T>where
T: CubeEnum,{
ComptimeVariant {
variant: i32,
runtime_value: <T as CubeEnum>::RuntimeValue,
matched: bool,
},
RuntimeVariant {
variant: NativeExpand<i32>,
cases: Vec<(NativeExpand<i32>, Scope)>,
runtime_value: <T as CubeEnum>::RuntimeValue,
default: Option<Scope>,
},
}Variants§
ComptimeVariant
RuntimeVariant
Fields
§
variant: NativeExpand<i32>§
cases: Vec<(NativeExpand<i32>, Scope)>§
runtime_value: <T as CubeEnum>::RuntimeValueImplementations§
Source§impl<T> MatchExpand<T>where
T: CubeEnum,
impl<T> MatchExpand<T>where
T: CubeEnum,
pub fn case( self, scope: &mut Scope, value: i32, block: impl FnOnce(&mut Scope, <T as CubeEnum>::RuntimeValue), ) -> MatchExpand<T>
pub fn default( self, scope: &mut Scope, block: impl FnOnce(&mut Scope, <T as CubeEnum>::RuntimeValue), ) -> MatchExpand<T>
pub fn finish(self, scope: &mut Scope)
Auto Trait Implementations§
impl<T> Freeze for MatchExpand<T>
impl<T> !RefUnwindSafe for MatchExpand<T>
impl<T> !Send for MatchExpand<T>
impl<T> !Sync for MatchExpand<T>
impl<T> Unpin for MatchExpand<T>
impl<T> UnsafeUnpin for MatchExpand<T>
impl<T> !UnwindSafe for MatchExpand<T>
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