Skip to main content

MutationListener

Trait MutationListener 

Source
pub trait MutationListener<'reference, Element>
where Element: Element,
{ // Required method fn update( &mut self, index: <Element::Label as Label>::Index, before: Value<'_>, after: Value<'_>, ); }
Expand description

Trait to allow graphs to react to mutation of elements. When an indexed element is updated the mutation listener is called with the index and the before and after values.

Required Methods§

Source

fn update( &mut self, index: <Element::Label as Label>::Index, before: Value<'_>, after: Value<'_>, )

Called when a setter is called on a projection of an indexed Element.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<Element> MutationListener<'_, Element> for ()
where Element: Element,

Source§

fn update( &mut self, _index: <Element::Label as Label>::Index, _before: Value<'_>, _after: Value<'_>, )

Implementors§