pub trait Observable: AsRef<Branch> {
type Event;
// Provided methods
fn observe<F>(&self, f: F) -> Subscription
where F: FnMut(&TransactionMut<'_>, &Self::Event) + 'static,
Event: AsRef<Self::Event> { ... }
fn observe_with<K, F>(&self, key: K, f: F)
where K: Into<Origin>,
F: FnMut(&TransactionMut<'_>, &Self::Event) + 'static,
Event: AsRef<Self::Event> { ... }
fn unobserve<K: Into<Origin>>(&self, key: K) -> bool { ... }
}Required Associated Types§
Provided Methods§
fn observe<F>(&self, f: F) -> Subscription
fn observe_with<K, F>(&self, key: K, f: F)
fn unobserve<K: Into<Origin>>(&self, key: K) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".