pub struct PropertySubscription { /* private fields */ }Expand description
Type-erased subscription that can subscribe to any Property
Implementations§
Source§impl PropertySubscription
impl PropertySubscription
Sourcepub fn from_property<V>(property: &Property<V>) -> Self
pub fn from_property<V>(property: &Property<V>) -> Self
Creates a new PropertySubscription from a source Property.
Sourcepub fn subscribe(&self, notify_fn: Rc<dyn Fn()>) -> Subscription
pub fn subscribe(&self, notify_fn: Rc<dyn Fn()>) -> Subscription
Subscribes to the source property and calls the notify function when it changes.
Auto Trait Implementations§
impl !RefUnwindSafe for PropertySubscription
impl !Send for PropertySubscription
impl !Sync for PropertySubscription
impl !UnwindSafe for PropertySubscription
impl Freeze for PropertySubscription
impl Unpin for PropertySubscription
impl UnsafeUnpin for PropertySubscription
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