pub enum Line {
Generic(Generic<Self>),
LineFromPoints(Expr<Point>, Expr<Point>),
AngleBisector(Expr<Point>, Expr<Point>, Expr<Point>),
PerpendicularThrough(Expr<Line>, Expr<Point>),
ParallelThrough(Expr<Line>, Expr<Point>),
PointVector(Expr<Point>, Expr<Number>),
}
Expand description
An unrolled line expression.
Variants§
Generic(Generic<Self>)
A generic expression
LineFromPoints(Expr<Point>, Expr<Point>)
A line going through two points.
AngleBisector(Expr<Point>, Expr<Point>, Expr<Point>)
A bisector line of an angle defined by three points.
PerpendicularThrough(Expr<Line>, Expr<Point>)
A line perpendicular to another one, going through a specific point
ParallelThrough(Expr<Line>, Expr<Point>)
A line perpendicular to another one, going through a specific point
PointVector(Expr<Point>, Expr<Number>)
A line made from a point and a direction vector
Implementations§
Trait Implementations§
Source§impl CloneWithNode for Line
impl CloneWithNode for Line
Source§fn clone_with_node(&mut self) -> Self
fn clone_with_node(&mut self) -> Self
Clone
self
and take its node.Source§fn clone_without_node(&self) -> Self
fn clone_without_node(&self) -> Self
Clone
self
without taking its node.Source§impl ConvertFrom<AnyExpr> for Line
impl ConvertFrom<AnyExpr> for Line
Source§fn convert_from(value: AnyExpr, context: &CompileContext) -> Expr<Self>
fn convert_from(value: AnyExpr, context: &CompileContext) -> Expr<Self>
Convert a value to
Self
. Read moreSource§fn can_convert_from(value: &AnyExpr) -> bool
fn can_convert_from(value: &AnyExpr) -> bool
Check if conversion from a value to
Self
can be made.Source§impl ConvertFrom<Expr<Circle>> for Line
impl ConvertFrom<Expr<Circle>> for Line
Source§fn convert_from(value: Expr<Circle>, context: &CompileContext) -> Expr<Self>
fn convert_from(value: Expr<Circle>, context: &CompileContext) -> Expr<Self>
Convert a value to
Self
. Read moreSource§impl ConvertFrom<Expr<Derived>> for Line
impl ConvertFrom<Expr<Derived>> for Line
Source§fn convert_from(value: Expr<Derived>, context: &CompileContext) -> Expr<Self>
fn convert_from(value: Expr<Derived>, context: &CompileContext) -> Expr<Self>
Convert a value to
Self
. Read moreSource§impl ConvertFrom<Expr<Line>> for Line
impl ConvertFrom<Expr<Line>> for Line
Source§fn convert_from(value: Expr<Line>, _context: &CompileContext) -> Expr<Self>
fn convert_from(value: Expr<Line>, _context: &CompileContext) -> Expr<Self>
Convert a value to
Self
. Read moreSource§impl ConvertFrom<Expr<Number>> for Line
impl ConvertFrom<Expr<Number>> for Line
Source§fn convert_from(value: Expr<Number>, context: &CompileContext) -> Expr<Self>
fn convert_from(value: Expr<Number>, context: &CompileContext) -> Expr<Self>
Convert a value to
Self
. Read moreSource§impl ConvertFrom<Expr<Point>> for Line
impl ConvertFrom<Expr<Point>> for Line
Source§fn convert_from(value: Expr<Point>, context: &CompileContext) -> Expr<Self>
fn convert_from(value: Expr<Point>, context: &CompileContext) -> Expr<Self>
Convert a value to
Self
. Read moreSource§impl ConvertFrom<Expr<PointCollection>> for Line
impl ConvertFrom<Expr<PointCollection>> for Line
Source§fn convert_from(
value: Expr<PointCollection>,
context: &CompileContext,
) -> Expr<Self>
fn convert_from( value: Expr<PointCollection>, context: &CompileContext, ) -> Expr<Self>
Convert a value to
Self
. Read moreSource§fn can_convert_from(value: &Expr<PointCollection>) -> bool
fn can_convert_from(value: &Expr<PointCollection>) -> bool
Check if conversion from a value to
Self
can be made.Source§impl ConvertFrom<Expr<Unknown>> for Line
impl ConvertFrom<Expr<Unknown>> for Line
Source§fn convert_from(value: Expr<Unknown>, _context: &CompileContext) -> Expr<Self>
fn convert_from(value: Expr<Unknown>, _context: &CompileContext) -> Expr<Self>
Convert a value to
Self
. Read moreSource§impl FromExpr<Line> for LineNode
impl FromExpr<Line> for LineNode
Source§fn from_expr(
expr: &Expr<Line>,
props: Properties,
context: &CompileContext,
) -> Self
fn from_expr( expr: &Expr<Line>, props: Properties, context: &CompileContext, ) -> Self
Build a node out of an unrolled expression.
Source§impl FromUnrolled<Line> for ExprKind
impl FromUnrolled<Line> for ExprKind
Source§impl GetMathType for Line
impl GetMathType for Line
fn get_math_type() -> ExprType
Source§impl GetValueType for Line
impl GetValueType for Line
fn get_value_type(&self) -> Type
Auto Trait Implementations§
impl Freeze for Line
impl !RefUnwindSafe for Line
impl !Send for Line
impl !Sync for Line
impl Unpin for Line
impl !UnwindSafe for Line
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>,
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