Trait xilem::ElementSplice

source ·
pub trait ElementSplice {
    // Required methods
    fn push(&mut self, element: WidgetPod<Box<dyn Widget>>);
    fn mutate(&mut self) -> WidgetMut<'_, Box<dyn Widget>>;
    fn delete(&mut self, n: usize);
    fn len(&self) -> usize;
}

Required Methods§

source

fn push(&mut self, element: WidgetPod<Box<dyn Widget>>)

Insert a new element at the current index in the resulting collection (and increment the index by 1)

source

fn mutate(&mut self) -> WidgetMut<'_, Box<dyn Widget>>

Mutate the next existing element, and add it to the resulting collection (and increment the index by 1)

source

fn delete(&mut self, n: usize)

Delete the next n existing elements (this doesn’t change the index)

source

fn len(&self) -> usize

Current length of the elements collection

Implementors§