pub enum Element<Node, Error>{
Component(Arc<dyn AnyComponent<Node = Node, Error = Error> + Send + Sync + 'static>),
Node(Node, Vec<Element<Node, Error>>),
Fragment(Vec<Element<Node, Error>>),
Provider(Arc<dyn Any + Send + Sync>, Vec<Element<Node, Error>>),
}
Expand description
The element type is returned from component render-functions. It can be constructed from a Node-type, e.G. HtmlNode, or a Component.
HtmlNode::element("div").attr("id", "test123").build().into()
Variants§
Component(Arc<dyn AnyComponent<Node = Node, Error = Error> + Send + Sync + 'static>)
Node(Node, Vec<Element<Node, Error>>)
Fragment(Vec<Element<Node, Error>>)
Provider(Arc<dyn Any + Send + Sync>, Vec<Element<Node, Error>>)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<Node, Error> Freeze for Element<Node, Error>where
Node: Freeze,
impl<Node, Error> !RefUnwindSafe for Element<Node, Error>
impl<Node, Error> Send for Element<Node, Error>where
Node: Send,
impl<Node, Error> Sync for Element<Node, Error>where
Node: Sync,
impl<Node, Error> Unpin for Element<Node, Error>where
Node: Unpin,
impl<Node, Error> !UnwindSafe for Element<Node, Error>
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