pub enum RuleKind {
PointEq(VarIndex, VarIndex),
NumberEq(VarIndex, VarIndex),
Gt(VarIndex, VarIndex),
Alternative(Vec<RuleKind>),
Invert(Box<RuleKind>),
Bias,
}
Expand description
Represents a rule of the figure. Rules are normalized iff:
- their operands are normalized
- their operands are sorted in ascending order
Variants§
PointEq(VarIndex, VarIndex)
Equality of two points (distance of 0)
NumberEq(VarIndex, VarIndex)
Equality of two numbers
Gt(VarIndex, VarIndex)
a > b
Alternative(Vec<RuleKind>)
At least one of the rules must be satisfied
Invert(Box<RuleKind>)
The inverse of a rule
Bias
A special bias rule for making the entity more stable in certain engines.
Trait Implementations§
Source§impl Ord for RuleKind
impl Ord for RuleKind
Source§impl PartialOrd for RuleKind
impl PartialOrd for RuleKind
Source§impl Reconstruct for RuleKind
impl Reconstruct for RuleKind
Source§fn reconstruct(self, arg0: &mut ReconstructCtx<'_>) -> Self
fn reconstruct(self, arg0: &mut ReconstructCtx<'_>) -> Self
Reconstruct the value.
impl Eq for RuleKind
impl StructuralPartialEq for RuleKind
Auto Trait Implementations§
impl Freeze for RuleKind
impl RefUnwindSafe for RuleKind
impl Send for RuleKind
impl Sync for RuleKind
impl Unpin for RuleKind
impl UnwindSafe for RuleKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneWithNode for Twhere
T: Clone,
impl<T> CloneWithNode for Twhere
T: Clone,
Source§fn clone_with_node(&mut self) -> T
fn clone_with_node(&mut self) -> T
Clone
self
and take its node.Source§fn clone_without_node(&self) -> T
fn clone_without_node(&self) -> T
Clone
self
without taking its node.Source§impl<T> Convert for T
impl<T> Convert for T
Source§fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
Convert
self
into a specific type. Read moreSource§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
Check if
self
can be converted into a specific type. Read more