Enum cranelift_isle::sema::Pattern [−][src]
pub enum Pattern {
BindPattern(TypeId, VarId, Box<Pattern>),
Var(TypeId, VarId),
ConstInt(TypeId, i64),
ConstPrim(TypeId, Sym),
Term(TypeId, TermId, Vec<TermArgPattern>),
Wildcard(TypeId),
And(TypeId, Vec<Pattern>),
}
Expand description
A left-hand side pattern of some rule.
Variants
BindPattern(TypeId, VarId, Box<Pattern>)
Bind a variable of the given type from the current value.
Keep matching on the value with the subpattern.
Var(TypeId, VarId)
Match the current value against an already bound variable with the given type.
ConstInt(TypeId, i64)
Match the current value against a constant integer of the given integer type.
ConstPrim(TypeId, Sym)
Match the current value against a constant primitive value of the given primitive type.
Term(TypeId, TermId, Vec<TermArgPattern>)
Match the current value against the given extractor term with the given arguments.
Wildcard(TypeId)
Tuple Fields
0: TypeId
Match anything of the given type successfully.
And(TypeId, Vec<Pattern>)
Match all of the following patterns of the given type.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Pattern
impl UnwindSafe for Pattern
Blanket Implementations
Mutably borrows from an owned value. Read more