pub enum Inst {
Show 22 variants
Bool(bool),
Number(i64),
Float(f64),
String(StringId),
Bytes(Vec<u8>),
Name(NameId),
Time(i64),
Duration(i64),
List(Vec<InstId>),
Map {
keys: Vec<InstId>,
values: Vec<InstId>,
},
Struct {
fields: Vec<NameId>,
values: Vec<InstId>,
},
Var(NameId),
ApplyFn {
function: NameId,
args: Vec<InstId>,
},
Atom {
predicate: NameId,
args: Vec<InstId>,
},
NegAtom(InstId),
Eq(InstId, InstId),
Ineq(InstId, InstId),
Transform {
var: Option<NameId>,
app: InstId,
},
Rule {
head: InstId,
premises: Vec<InstId>,
transform: Vec<InstId>,
},
Decl {
atom: InstId,
descr: Vec<InstId>,
bounds: Vec<InstId>,
constraints: Option<InstId>,
},
BoundDecl {
base_terms: Vec<InstId>,
},
Constraints {
consequences: Vec<InstId>,
alternatives: Vec<Vec<InstId>>,
},
}Expand description
Instructions in the Mangle IR.
Variants§
Bool(bool)
Number(i64)
Float(f64)
String(StringId)
A string constant (e.g. “foo”).
Bytes(Vec<u8>)
Name(NameId)
A name constant (e.g. /foo).
Time(i64)
Time as nanoseconds since Unix epoch.
Duration(i64)
Duration as nanoseconds.
List(Vec<InstId>)
A list of values. args point to other Constant-like instructions.
Map
A map of values. keys and values must have same length.
Struct
A struct. fields and values must have same length.
Var(NameId)
A variable.
ApplyFn
Application of a function.
Atom
An atom (predicate application).
NegAtom(InstId)
Negation of an atom.
Eq(InstId, InstId)
Equality constraint (left = right).
Ineq(InstId, InstId)
Inequality constraint (left != right).
Transform
A transform statement: let var = app.
Rule
A Horn clause (Rule).
Decl
A Declaration.
BoundDecl
Bound Declaration.
Constraints
Constraints.
Trait Implementations§
impl StructuralPartialEq for Inst
Auto Trait Implementations§
impl Freeze for Inst
impl RefUnwindSafe for Inst
impl Send for Inst
impl Sync for Inst
impl Unpin for Inst
impl UnsafeUnpin for Inst
impl UnwindSafe for Inst
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