Skip to main content

Mutations

Struct Mutations 

Source
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 Debug for Mutations

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Mutations

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Mutations

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Mutations

Source§

impl WriteMutations for Mutations

Source§

fn push_id(&mut self, id: ElementId)

Push the node registered to id onto the stack.
Source§

fn set_id(&mut self, id: ElementId)

Register the current top node under id, leaving it on the stack. Read more
Source§

fn child(&mut self, index: usize)

Replace the current top node with its indexth child.
Source§

fn append_children(&mut self, m: usize)

Append the top m nodes to the parent below them. Leaves the parent on the stack.
Source§

fn replace_with(&mut self, m: usize)

Replace the target below the top m nodes with those nodes. Consumes the target and replacement nodes.
Source§

fn insert_after(&mut self, m: usize)

Insert the top m nodes after the anchor below them. Leaves the anchor on the stack.
Source§

fn insert_before(&mut self, m: usize)

Insert the top m nodes before the anchor below them. Leaves the anchor on the stack.
Source§

fn create_element(&mut self, tag: &str, ns: Option<&str>)

Create an element and push it onto the stack.
Source§

fn create_text(&mut self, value: &str)

Create a text node and push it onto the stack.
Source§

fn set_text(&mut self, value: &str)

Set the text content of a node. Read more
Source§

fn add_event_listener(&mut self, name: &str)

Create a new Event Listener. Read more
Source§

fn remove_event_listener(&mut self, name: &str)

Remove an existing Event Listener. Read more
Source§

fn pop(&mut self)

Pop and discard the current top node.
Source§

fn clone(&mut self)

Replace the current top node with a deep clone of itself.
Source§

fn remove(&mut self)

Remove the current top node from the DOM and consume it.
Source§

fn set_attribute( &mut self, name: &str, ns: Option<&str>, value: BorrowedAttributeValue<'_>, )

Set the value of a node’s attribute. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<W> MultiWriter for W
where W: WriteMutations,

Source§

type Writer = W

The writer type serving each individual target.
Source§

fn writer_for(&mut self, id: RenderTargetId) -> Option<&mut W>

The writer for id, or None for a target with no attached host.
Source§

impl<Ret> SpawnIfAsync<(), Ret> for Ret

Source§

fn spawn(self) -> Ret

Spawn the value into the dioxus runtime if it is an async block
Source§

impl<T, O> SuperFrom<T> for O
where O: From<T>,

Source§

fn super_from(input: T) -> O

Convert from a type to another type.
Source§

impl<T, O, M> SuperInto<O, M> for T
where O: SuperFrom<T, M>,

Source§

fn super_into(self) -> O

Convert from a type to another type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more