use super::{ChangeSet, IObservableList, ISourceList};
use std::rc::Rc;
pub trait SourceListEx<T: Clone + PartialEq + 'static>: IObservableList<T> {
fn cast_list<U: Clone + 'static>(&self, conversion_factory: impl Fn(&T) -> U + 'static) -> Rc<dyn ferroui_system::IObservable<ChangeSet<U>>>
where
Self: ISourceList<T>,
{
ferroui_reactive::ObservableExt::select(&IObservableList::connect(self), move |changes: ChangeSet<T>| super::transform_change_set(&changes, &conversion_factory))
}
super::ops::defer_until_loaded::defer_until_loaded_source_methods!();
super::ops::expire_after::expire_after_source_methods!();
super::ops::limit_size_to::limit_size_to_source_methods!();
}
impl<T: Clone + PartialEq + 'static, L: IObservableList<T> + ?Sized> SourceListEx<T> for L {}