pub struct Entity { /* private fields */ }Expand description
Struct which represents an Aframe entity or primitive
Implementations§
Source§impl Entity
impl Entity
pub fn new( attributes: Vec<Attribute>, components: Vec<(Cow<'static, str>, Box<dyn Component>)>, children: Vec<Entity>, ) -> Self
pub fn new_primitive( tag: Cow<'static, str>, attributes: Vec<Attribute>, components: Vec<(Cow<'static, str>, Box<dyn Component>)>, children: Vec<Entity>, ) -> Self
pub fn with_components( components: Vec<(Cow<'static, str>, Box<dyn Component>)>, ) -> Self
pub fn attributes(&self) -> &Vec<Attribute>
pub fn attributes_mut(&mut self) -> &mut Vec<Attribute>
pub fn components(&self) -> &Vec<(Cow<'static, str>, Box<dyn Component>)>
pub fn components_mut( &mut self, ) -> &mut Vec<(Cow<'static, str>, Box<dyn Component>)>
pub fn children(&self) -> &Vec<Entity>
pub fn children_mut(&mut self) -> &mut Vec<Entity>
pub fn tag(&self) -> Cow<'static, str>
Trait Implementations§
Source§impl Htmlify for Entity
impl Htmlify for Entity
Source§fn tag(&self) -> Cow<'static, str>
fn tag(&self) -> Cow<'static, str>
Sets the HTML tag associated when converting this to an element.
Source§fn attributes(&self) -> Vec<Attribute>
fn attributes(&self) -> Vec<Attribute>
Sets the attributes to include when converting this to an element.
Source§fn as_raw_html(&self) -> String
fn as_raw_html(&self) -> String
Convert this to a raw string of HTML
Source§fn inner_html_as_string(&self) -> String
fn inner_html_as_string(&self) -> String
Stringifies the inner HTML
Source§fn as_element(&self) -> Option<Element>
fn as_element(&self) -> Option<Element>
Convert this into a web_sys::Element
Source§fn as_yew_node(&self) -> VNode
fn as_yew_node(&self) -> VNode
Convert this into ::yew::Html
impl StructuralPartialEq for Entity
Auto Trait Implementations§
impl Freeze for Entity
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.