pub enum Entity {
Scalar(Scalar),
Point(Point),
Line(Line),
Circle(Circle),
}
Expand description
An entity is a single primitive on the figure plane.
Variants§
Implementations§
source§impl Entity
impl Entity
pub fn free_point() -> Self
pub fn free_scalar() -> Self
pub fn free_circle() -> Self
pub fn as_point(&self) -> Option<&Point>
pub fn as_point_mut(&mut self) -> Option<&mut Point>
Trait Implementations§
source§impl CloneWithNode for Entity
impl CloneWithNode for Entity
fn clone_with_node(&mut self) -> Self
fn clone_without_node(&self) -> Self
source§impl Definition for Entity
impl Definition for Entity
source§fn order(&self, context: &CompileContext) -> usize
fn order(&self, context: &CompileContext) -> usize
Get the complexity order (how much adjustment is done to this entity).
source§fn contains_entity(&self, entity: usize, context: &CompileContext) -> bool
fn contains_entity(&self, entity: usize, context: &CompileContext) -> bool
Check if the object contains an entity
Auto Trait Implementations§
impl !RefUnwindSafe for Entity
impl !Send for Entity
impl !Sync for Entity
impl Unpin for Entity
impl !UnwindSafe for Entity
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> 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>,
Errors Read more
source§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
Errors Read more