pub enum RuleKind {
PointEq(VarIndex, VarIndex),
NumberEq(VarIndex, VarIndex),
Lt(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
Lt(VarIndex, VarIndex)
a < b
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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