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
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for DomChange<T>
impl<T> !Send for DomChange<T>
impl<T> !Sync for DomChange<T>
impl<T> Unpin for DomChange<T>
impl<T> !UnwindSafe for DomChange<T>
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