pub struct ReactiveExtensions;Expand description
Observables of the properties of view models.
Implementations§
Source§impl ReactiveExtensions
impl ReactiveExtensions
Sourcepub fn get_observable<TOwner, TValue>(
vm: &Rc<TOwner>,
property_name: &'static str,
property: impl Fn(&TOwner) -> TValue + 'static,
fire_immediately: bool,
) -> Rc<dyn IObservable<TValue>>where
TOwner: INotifyPropertyChanged + ?Sized + 'static,
TValue: 'static,
pub fn get_observable<TOwner, TValue>(
vm: &Rc<TOwner>,
property_name: &'static str,
property: impl Fn(&TOwner) -> TValue + 'static,
fire_immediately: bool,
) -> Rc<dyn IObservable<TValue>>where
TOwner: INotifyPropertyChanged + ?Sized + 'static,
TValue: 'static,
vm.GetObservable(x => x.Property, fireImmediately): an observable of
the values of a property of a view model, produced again whenever the
view model notifies a change of the property.
The original takes the property as an expression and reads its name
and its value through reflection; here the name of the property and
the function that reads it are passed. When fire_immediately is set,
each observer receives the current value when it subscribes.
Auto Trait Implementations§
impl Freeze for ReactiveExtensions
impl RefUnwindSafe for ReactiveExtensions
impl Send for ReactiveExtensions
impl Sync for ReactiveExtensions
impl Unpin for ReactiveExtensions
impl UnsafeUnpin for ReactiveExtensions
impl UnwindSafe for ReactiveExtensions
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