pub enum IrCommand {
CreateNode {
id: NodeId,
view_type: ViewType,
props: HashMap<String, PropValue>,
style: LayoutStyle,
},
UpdateProps {
id: NodeId,
diff: PropsDiff,
},
UpdateStyle {
id: NodeId,
style: LayoutStyle,
},
AppendChild {
parent: NodeId,
child: NodeId,
},
InsertBefore {
parent: NodeId,
child: NodeId,
before: NodeId,
},
RemoveChild {
parent: NodeId,
child: NodeId,
},
SetRootNode {
id: NodeId,
},
}Expand description
A single command from the reconciler to the engine. Each React commit produces a batch of these commands.
Variants§
CreateNode
Create a new node with initial props and style.
UpdateProps
Update props on an existing node (only changed props).
UpdateStyle
Update layout style on an existing node.
AppendChild
Append a child to a parent (at the end).
InsertBefore
Insert a child before another child.
RemoveChild
Remove a child from its parent (and destroy the subtree).
SetRootNode
Set the root node of the tree.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IrCommand
impl<'de> Deserialize<'de> for IrCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IrCommand
impl RefUnwindSafe for IrCommand
impl Send for IrCommand
impl Sync for IrCommand
impl Unpin for IrCommand
impl UnsafeUnpin for IrCommand
impl UnwindSafe for IrCommand
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