FerroDictionaryExtensions
struct · ferroui-base · v0.5.0
struct FerroDictionaryExtensions
Defines extension methods for working with FerroDictionarys.
Members
for_each_item
fn for_each_item<K, V, D>(collection: &D, added: impl Fn(&K, &V) -> () + 'static, removed: impl Fn(&K, &V) -> () + 'static, reset: impl Fn() -> () + 'static, weak_subscription: bool) -> Rc<dyn IDisposable>
where K: Clone + 'static,
V: Clone + 'static,
D: IFerroReadOnlyDictionary<K, V> + WeakEventSender
Invokes an action for each item in a collection and subsequently each item added or removed from the collection.
added is called initially for each item in the collection and
subsequently for each item added to the collection, with the key and
the value; removed for each item removed from the collection;
reset when the collection is reset, which is followed by calls to
added for each item present in the collection after the reset.
weak_subscription indicates if a weak subscription should be used to
track changes to the collection (held by the returned disposable, see
FerroListExtensions::for_each_item_indexed).
Returns a disposable used to terminate the subscription.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.