pub enum DomChange<T>where
T: Debug + Clone,{
ReplaceElement {
coord: Vec<RespoCoord>,
dom_path: Vec<u32>,
node: RespoNode<T>,
},
ModifyChildren {
coord: Vec<RespoCoord>,
dom_path: Vec<u32>,
operations: Vec<ChildDomOp<T>>,
},
ModifyAttrs {
coord: Vec<RespoCoord>,
dom_path: Vec<u32>,
set: HashMap<String, String>,
unset: HashSet<String>,
},
ModifyStyle {
coord: Vec<RespoCoord>,
dom_path: Vec<u32>,
set: HashMap<String, String>,
unset: HashSet<String>,
},
ModifyEvent {
coord: Vec<RespoCoord>,
dom_path: Vec<u32>,
add: HashSet<String>,
remove: HashSet<String>,
},
Effect {
coord: Vec<RespoCoord>,
dom_path: Vec<u32>,
effect_type: RespoEffectType,
skip_indexes: HashSet<u32>,
},
}
Expand description
DOM operations used for diff/patching performance is not optimial since looking up the DOM via dom_path has repetitive operations, might need to fix in future is overhead observed.
Variants§
ReplaceElement
ModifyChildren
ModifyAttrs
Fields
§
coord: Vec<RespoCoord>
ModifyStyle
Fields
§
coord: Vec<RespoCoord>
ModifyEvent
Effect
this is only part of effects. effects that collected while diffing children are nested inside