pub struct JSXElement<'gc> { /* private fields */ }Expand description
Clone-with-changes builder for super::JSXElement.
Implementations§
Source§impl<'gc> JSXElement<'gc>
impl<'gc> JSXElement<'gc>
Sourcepub fn from_node(node: &'gc JSXElement<'gc>) -> Self
pub fn from_node(node: &'gc JSXElement<'gc>) -> Self
Start from a copy of node, with no field changed yet.
Sourcepub fn build(self, gc: &'gc GCLock<'_, '_>) -> TransformResult<&'gc Node<'gc>>
pub fn build(self, gc: &'gc GCLock<'_, '_>) -> TransformResult<&'gc Node<'gc>>
Allocate the rebuilt node if a setter ran, else
TransformResult::Unchanged.
Sourcepub fn build_forced(self, gc: &'gc GCLock<'_, '_>) -> &'gc Node<'gc>
pub fn build_forced(self, gc: &'gc GCLock<'_, '_>) -> &'gc Node<'gc>
Allocate the node unconditionally, changed or not.
Sourcepub fn opening_element(&mut self, opening_element: &'gc Node<'gc>)
pub fn opening_element(&mut self, opening_element: &'gc Node<'gc>)
Set the opening_element field and mark the builder changed.
Sourcepub fn children(&mut self, children: NodeList<'gc>)
pub fn children(&mut self, children: NodeList<'gc>)
Set the children field and mark the builder changed.
Sourcepub fn closing_element(&mut self, closing_element: Option<&'gc Node<'gc>>)
pub fn closing_element(&mut self, closing_element: Option<&'gc Node<'gc>>)
Set the closing_element field and mark the builder changed.
Trait Implementations§
Auto Trait Implementations§
impl<'gc> !Freeze for JSXElement<'gc>
impl<'gc> !RefUnwindSafe for JSXElement<'gc>
impl<'gc> !Send for JSXElement<'gc>
impl<'gc> !Sync for JSXElement<'gc>
impl<'gc> !UnwindSafe for JSXElement<'gc>
impl<'gc> Unpin for JSXElement<'gc>
impl<'gc> UnsafeUnpin for JSXElement<'gc>
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