ferroui-dynamic-data 0.3.0

A port of DynamicData for FerroUI: reactive collections, change sets, observable caches and lists with their operators, independent of the user interface
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! `Convert` (`Cache/ObservableCacheEx.Convert.cs`; obsolete upstream in favour of `Transform`).

macro_rules! convert_methods {
    () => {
        /// The change sets with each item, and each previous item, converted by
        /// `conversion_factory` (`Convert(Func<TObject, TDestination>)`).
        fn convert<U: Clone + 'static>(&self, conversion_factory: impl Fn(&T) -> U + 'static) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<U, K>>> {
            crate::cache::internal::cast(self.change_sets(), std::rc::Rc::new(conversion_factory))
        }
    };
}
pub(crate) use convert_methods;