pub struct WeakWatcher<T> { /* private fields */ }Expand description
A weak reference to a watchable value that can be upgraded to a full watcher later.
Implementations§
Source§impl<T: Clone + Eq> WeakWatcher<T>
impl<T: Clone + Eq> WeakWatcher<T>
Source§impl<T: Clone + Default + Eq> WeakWatcher<T>
impl<T: Clone + Default + Eq> WeakWatcher<T>
Sourcepub fn upgrade_lazy(&self) -> LazyDirect<T>
pub fn upgrade_lazy(&self) -> LazyDirect<T>
Upgrade to a LazyDirect watcher, allowing to observe the value.
The LazyDirect fetches the value on demand, and thus lazy_upgrade succeeds
even if the underlying watchable has been dropped.
Trait Implementations§
Source§impl<T: Clone> Clone for WeakWatcher<T>
impl<T: Clone> Clone for WeakWatcher<T>
Source§fn clone(&self) -> WeakWatcher<T>
fn clone(&self) -> WeakWatcher<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for WeakWatcher<T>
impl<T> RefUnwindSafe for WeakWatcher<T>
impl<T> Send for WeakWatcher<T>
impl<T> Sync for WeakWatcher<T>
impl<T> Unpin for WeakWatcher<T>
impl<T> UnwindSafe for WeakWatcher<T>
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