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