pub struct FerroDictionaryExtensions;Expand description
Defines extension methods for working with FerroDictionarys.
Implementations§
Source§impl FerroDictionaryExtensions
impl FerroDictionaryExtensions
Sourcepub 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>
pub 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>
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.
Auto Trait Implementations§
impl Freeze for FerroDictionaryExtensions
impl RefUnwindSafe for FerroDictionaryExtensions
impl Send for FerroDictionaryExtensions
impl Sync for FerroDictionaryExtensions
impl Unpin for FerroDictionaryExtensions
impl UnsafeUnpin for FerroDictionaryExtensions
impl UnwindSafe for FerroDictionaryExtensions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more