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
//! `IgnoreSameReferenceUpdate` (`Cache/ObservableCacheEx.IgnoreSameReferenceUpdate.cs`).

macro_rules! ignore_same_reference_update_methods {
    () => {
        /// The changes without the updates whose current item is the previous one
        /// (`IgnoreSameReferenceUpdate`, `IgnoreUpdateWhen((c, p) => ReferenceEquals(c, p))`).
        ///
        /// Deviation (DEVIATIONS.md, DynamicData): the reference of an item is the object its
        /// pointer refers to (`T: Deref`, an `Rc<..>` for the classes of upstream); two items are
        /// the same reference when they point to the same object.
        fn ignore_same_reference_update(&self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::ChangeSet<T, K>>>
        where
            T: std::ops::Deref,
        {
            self.ignore_update_when(|current: &T, previous: &T| std::ptr::eq(std::ops::Deref::deref(current), std::ops::Deref::deref(previous)))
        }
    };
}
pub(crate) use ignore_same_reference_update_methods;