pub struct Mutations {
pub edits: Vec<Mutation>,
}
Expand description
A static list of mutations that can be applied to the DOM. Note: this list does not contain any Any
attribute values
Fields§
§edits: Vec<Mutation>
Any mutations required to patch the renderer to match the layout of the VirtualDom
Trait Implementations§
Source§impl WriteMutations for Mutations
impl WriteMutations for Mutations
Source§fn append_children(&mut self, id: ElementId, m: usize)
fn append_children(&mut self, id: ElementId, m: usize)
Add these m children to the target element Read more
Source§fn assign_node_id(&mut self, path: &'static [u8], id: ElementId)
fn assign_node_id(&mut self, path: &'static [u8], id: ElementId)
Assign the element at the given path the target ElementId. Read more
Source§fn create_placeholder(&mut self, id: ElementId)
fn create_placeholder(&mut self, id: ElementId)
Create a placeholder in the DOM that we will use later. Read more
Source§fn create_text_node(&mut self, value: &str, id: ElementId)
fn create_text_node(&mut self, value: &str, id: ElementId)
Create a node specifically for text with the given value Read more
Source§fn load_template(&mut self, _template: Template, index: usize, id: ElementId)
fn load_template(&mut self, _template: Template, index: usize, id: ElementId)
Load and clone an existing node from a template saved under that specific name Read more
Source§fn replace_node_with(&mut self, id: ElementId, m: usize)
fn replace_node_with(&mut self, id: ElementId, m: usize)
Replace the target element (given by its ID) with the topmost m nodes on the stack Read more
Source§fn replace_placeholder_with_nodes(&mut self, path: &'static [u8], m: usize)
fn replace_placeholder_with_nodes(&mut self, path: &'static [u8], m: usize)
Replace an existing element in the template at the given path with the m nodes on the stack Read more
Source§fn insert_nodes_after(&mut self, id: ElementId, m: usize)
fn insert_nodes_after(&mut self, id: ElementId, m: usize)
Insert a number of nodes after a given node. Read more
Source§fn insert_nodes_before(&mut self, id: ElementId, m: usize)
fn insert_nodes_before(&mut self, id: ElementId, m: usize)
Insert a number of nodes before a given node. Read more
Source§fn set_attribute(
&mut self,
name: &'static str,
ns: Option<&'static str>,
value: &AttributeValue,
id: ElementId,
)
fn set_attribute( &mut self, name: &'static str, ns: Option<&'static str>, value: &AttributeValue, id: ElementId, )
Set the value of a node’s attribute. Read more
Source§fn set_node_text(&mut self, value: &str, id: ElementId)
fn set_node_text(&mut self, value: &str, id: ElementId)
Set the text content of a node. Read more
Source§fn create_event_listener(&mut self, name: &'static str, id: ElementId)
fn create_event_listener(&mut self, name: &'static str, id: ElementId)
Create a new Event Listener. Read more
Source§fn remove_event_listener(&mut self, name: &'static str, id: ElementId)
fn remove_event_listener(&mut self, name: &'static str, id: ElementId)
Remove an existing Event Listener. Read more
Source§fn remove_node(&mut self, id: ElementId)
fn remove_node(&mut self, id: ElementId)
Remove a particular node from the DOM Read more
impl StructuralPartialEq for Mutations
Auto Trait Implementations§
impl Freeze for Mutations
impl !RefUnwindSafe for Mutations
impl !Send for Mutations
impl !Sync for Mutations
impl Unpin for Mutations
impl !UnwindSafe for Mutations
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.