pub enum ChildrenMutation<'a> {
    Append {
        prev: &'a Node,
        added: &'a [&'a Node],
    },
    Insert {
        prev: &'a Node,
        added: &'a [&'a Node],
        next: &'a Node,
    },
    Prepend {
        added: &'a [&'a Node],
        next: &'a Node,
    },
    Replace {
        prev: Option<&'a Node>,
        removed: &'a Node,
        added: &'a [&'a Node],
        next: Option<&'a Node>,
    },
    ReplaceAll {
        removed: &'a [&'a Node],
        added: &'a [&'a Node],
    },
    ChangeText,
}

Variants

Append

Fields

prev: &'a Node
added: &'a [&'a Node]

Insert

Fields

prev: &'a Node
added: &'a [&'a Node]
next: &'a Node

Prepend

Fields

added: &'a [&'a Node]
next: &'a Node

Replace

Fields

prev: Option<&'a Node>
removed: &'a Node
added: &'a [&'a Node]
next: Option<&'a Node>

ReplaceAll

Fields

removed: &'a [&'a Node]
added: &'a [&'a Node]

ChangeText

Mutation for when a Text node’s data is modified. This doesn’t change the structure of the list, which is what the other variants’ fields are stored for at the moment, so this can just have no fields.

Implementations

Get the child that follows the added or removed children. Currently only used when this mutation might force us to restyle later children (see HAS_SLOW_SELECTOR_LATER_SIBLINGS and Element’s implementation of VirtualMethods::children_changed).

If nodes were added or removed at the start or end of a container, return any previously-existing child whose “:first-child” or “:last-child” status may have changed.

NOTE: This does not check whether the inserted/removed nodes were elements, so in some cases it will return a false positive. This doesn’t matter for correctness, because at worst the returned element will be restyled unnecessarily.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

Convert
Convert
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more