pub struct Derived {
pub name: &'static str,
pub data: DerivedData,
}
Expand description
A special derived type expression. Used to encapsulate special behavior behind dynamic dispatch.
Fields§
§name: &'static str
Name of this derived type.
data: DerivedData
The actual data.
Implementations§
Trait Implementations§
Source§impl CloneWithNode for Derived
impl CloneWithNode for Derived
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 Derived
impl ConvertFrom<AnyExpr> for Derived
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 Derived
impl ConvertFrom<Expr<Circle>> for Derived
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 Derived
impl ConvertFrom<Expr<Derived>> for Derived
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 Derived
impl ConvertFrom<Expr<Line>> for Derived
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 Derived
impl ConvertFrom<Expr<Number>> for Derived
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 Derived
impl ConvertFrom<Expr<Point>> for Derived
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 Derived
impl ConvertFrom<Expr<PointCollection>> for Derived
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 Derived
impl ConvertFrom<Expr<Unknown>> for Derived
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 GetValueType for Derived
impl GetValueType for Derived
fn get_value_type(&self) -> Type
Auto Trait Implementations§
impl Freeze for Derived
impl !RefUnwindSafe for Derived
impl !Send for Derived
impl !Sync for Derived
impl Unpin for Derived
impl !UnwindSafe for Derived
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