pub enum AnyExpr {
Point(Expr<Point>),
Line(Expr<Line>),
Scalar(Expr<Scalar>),
Circle(Expr<Circle>),
PointCollection(Expr<PointCollection>),
Bundle(Expr<Bundle>),
}Variants§
Point(Expr<Point>)
Line(Expr<Line>)
Scalar(Expr<Scalar>)
Circle(Expr<Circle>)
PointCollection(Expr<PointCollection>)
Bundle(Expr<Bundle>)
Implementations§
source§impl AnyExpr
impl AnyExpr
sourcepub fn get_span_mut(&mut self) -> &mut Span
pub fn get_span_mut(&mut self) -> &mut Span
Clones the expression and sets its own span. This will be treated as a separate expression now.
sourcepub fn get_span(&self) -> Span
pub fn get_span(&self) -> Span
Clones the expression and sets its own span. This will be treated as a separate expression now.
pub fn as_point(&self) -> Option<&Expr<Point>>
pub fn get_type(&self) -> Type
sourcepub fn convert_to(self, to: Type) -> Result<Self, Error>
pub fn convert_to(self, to: Type) -> Result<Self, Error>
Errors
Returns an error if the conversion is invalid.
pub fn boxed(self, weight: FastFloat, span: Span) -> Self
sourcepub fn get_variable_span(&self) -> Span
pub fn get_variable_span(&self) -> Span
Panics
Panics if not a variable.
pub fn make_variable(self, name: String) -> Self
Trait Implementations§
source§impl ConvertFrom<AnyExpr> for Bundle
impl ConvertFrom<AnyExpr> for Bundle
source§impl ConvertFrom<AnyExpr> for Circle
impl ConvertFrom<AnyExpr> for Circle
source§impl ConvertFrom<AnyExpr> for Line
impl ConvertFrom<AnyExpr> for Line
source§impl ConvertFrom<AnyExpr> for Point
impl ConvertFrom<AnyExpr> for Point
source§impl ConvertFrom<AnyExpr> for PointCollection
impl ConvertFrom<AnyExpr> for PointCollection
source§impl ConvertFrom<AnyExpr> for Scalar
impl ConvertFrom<AnyExpr> for Scalar
source§impl Definition for AnyExpr
impl Definition for AnyExpr
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 AnyExpr
impl !Send for AnyExpr
impl !Sync for AnyExpr
impl Unpin for AnyExpr
impl !UnwindSafe for AnyExpr
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