ListModelExtManual

Trait ListModelExtManual 

Source
pub trait ListModelExtManual: Sized + IsA<ListModel> {
    // Provided methods
    fn snapshot(&self) -> Vec<Object> { ... }
    fn iter<LT>(&self) -> ListModelIter<'_, LT>
       where LT: IsA<Object> { ... }
}

Provided Methods§

Source

fn snapshot(&self) -> Vec<Object>

Get an immutable snapshot of the container inside the ListModel. Any modification done to the returned container Vec will not be reflected on the ListModel.

Source

fn iter<LT>(&self) -> ListModelIter<'_, LT>
where LT: IsA<Object>,

If T::static_type().is_a(self.item_type()) then it returns an iterator over the ListModel elements, else the types are not compatible and it panics.

§Panics

Panics if T::static_type().is_a(self.item_type()) is not true.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> ListModelExtManual for T
where T: IsA<ListModel>,