Enum cranelift_isle::sema::Pattern
source · [−]pub enum Pattern {
BindPattern(TypeId, VarId, Box<Pattern>),
Var(TypeId, VarId),
ConstInt(TypeId, i64),
ConstPrim(TypeId, Sym),
Term(TypeId, TermId, Vec<Pattern>),
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<Pattern>)
Match the current value against the given extractor term with the given arguments.
Wildcard(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
impl Eq for Pattern
impl StructuralEq for Pattern
impl StructuralPartialEq for Pattern
Auto Trait Implementations
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnwindSafe for Pattern
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more