pub struct ComponentExpression {
pub component_type: Ident,
pub constructors: Vec<ConstructorCall>,
pub body: BlockStatement,
}Expand description
A component expression: the declarative tree-building form.
ComponentType.method(args)[.method2(args2)...] { body }
T { ... }— no constructor, has bodyR.cube()— one constructor, no bodyT.position(x,y,z).scale(a,b,c) { C {} }— two constructors + body
The body is a plain BlockStatement: all MMS language features are
available inside it. CE emissions inside the body become children of this
node; builder calls (identifiers not in env) configure this component.
Fields§
§component_type: Ident§constructors: Vec<ConstructorCall>All chained constructor calls from the header (before {), in order.
Empty when there is no .method(...) on the type name.
body: BlockStatementTrait Implementations§
Source§impl CeBuilder for ComponentExpression
impl CeBuilder for ComponentExpression
Source§impl Clone for ComponentExpression
impl Clone for ComponentExpression
Source§fn clone(&self) -> ComponentExpression
fn clone(&self) -> ComponentExpression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComponentExpression
impl Debug for ComponentExpression
Source§impl PartialEq for ComponentExpression
impl PartialEq for ComponentExpression
impl StructuralPartialEq for ComponentExpression
Auto Trait Implementations§
impl Freeze for ComponentExpression
impl RefUnwindSafe for ComponentExpression
impl Send for ComponentExpression
impl Sync for ComponentExpression
impl Unpin for ComponentExpression
impl UnsafeUnpin for ComponentExpression
impl UnwindSafe for ComponentExpression
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§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.