pub struct RefreshHandle<T, E> { /* private fields */ }Expand description
A handle that can update the value associated with a refreshable.
Implementations§
Source§impl<T, E> RefreshHandle<T, E>
impl<T, E> RefreshHandle<T, E>
Sourcepub fn refresh(&mut self, new_value: T) -> Result<(), Vec<E>>
pub fn refresh(&mut self, new_value: T) -> Result<(), Vec<E>>
Updates the refreshable’s value.
If the new value is equal to the refreshable’s current value, the method returns immediately. Otherwise, it runs all registered subscriptions, collecting any errors and returning them all when finished.
Auto Trait Implementations§
impl<T, E> Freeze for RefreshHandle<T, E>
impl<T, E> !RefUnwindSafe for RefreshHandle<T, E>
impl<T, E> Send for RefreshHandle<T, E>
impl<T, E> Sync for RefreshHandle<T, E>
impl<T, E> Unpin for RefreshHandle<T, E>
impl<T, E> !UnwindSafe for RefreshHandle<T, E>
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