pub struct Observer<T: Value> { /* private fields */ }Implementations§
Source§impl<T: Value> Observer<T>
impl<T: Value> Observer<T>
pub fn try_get_value(&self) -> Result<T, ObserverError>
pub fn value(&self) -> T
pub fn subscribe( &self, on_update: impl FnMut(Update<&T>) + 'static + NotObserver, ) -> SubscriptionToken
pub fn try_subscribe( &self, on_update: impl FnMut(Update<&T>) + 'static + NotObserver, ) -> Result<SubscriptionToken, ObserverError>
pub fn state(&self) -> WeakState
pub fn unsubscribe(&self, token: SubscriptionToken) -> Result<(), ObserverError>
pub fn save_dot_to_file(&self, named: &str)
pub fn save_dot_to_string(&self) -> String
pub fn disallow_future_use(&self)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Observer<T>
impl<T> !RefUnwindSafe for Observer<T>
impl<T> !Send for Observer<T>
impl<T> !Sync for Observer<T>
impl<T> Unpin for Observer<T>
impl<T> !UnwindSafe for Observer<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