pub struct Observer { /* private fields */ }
Expand description
An Observer
can be used to register observation requests, corresponding to individual hanging
get calls. These will be notified when the state changes or immediately the first time
an Observer
registers an observation.
Implementations§
Source§impl Observer
impl Observer
Sourcepub fn next(&self, responder: ProviderGetResponder)
pub fn next(&self, responder: ProviderGetResponder)
Register a new observation request.
A newly-created observer will first receive the current state. After the first call, the observer will be notified only if the state changes.
Errors occur when an Observer attempts to wait for an update when there is a update request already pending.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Observer
impl !RefUnwindSafe for Observer
impl Send for Observer
impl Sync for Observer
impl Unpin for Observer
impl !UnwindSafe for Observer
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