pub struct RestoreTokenConsumer { /* private fields */ }Expand description
Watches a Selection’s restore token without keeping the selection alive.
Implementations§
Source§impl RestoreTokenConsumer
impl RestoreTokenConsumer
Sourcepub fn token(&self) -> Option<RestoreToken>
pub fn token(&self) -> Option<RestoreToken>
Return the current token without waiting.
Sourcepub fn poll_changed(
&mut self,
waiter: &Waiter,
) -> Poll<Option<Option<RestoreToken>>>
pub fn poll_changed( &mut self, waiter: &Waiter, ) -> Poll<Option<Option<RestoreToken>>>
Wait for the token to differ from the last one this consumer saw and
return it, Some(None) once cleared, or None after every clone of the
selection is dropped. Changes in between are coalesced into the latest.
Sourcepub async fn changed(&mut self) -> Option<Option<RestoreToken>>
pub async fn changed(&mut self) -> Option<Option<RestoreToken>>
Wait for the token to differ from the last one this consumer saw and
return it, Some(None) once cleared, or None after every clone of the
selection is dropped. Changes in between are coalesced into the latest.
Awaits poll_changed.
Trait Implementations§
Source§impl Clone for RestoreTokenConsumer
impl Clone for RestoreTokenConsumer
Auto Trait Implementations§
impl Freeze for RestoreTokenConsumer
impl RefUnwindSafe for RestoreTokenConsumer
impl Send for RestoreTokenConsumer
impl Sync for RestoreTokenConsumer
impl Unpin for RestoreTokenConsumer
impl UnsafeUnpin for RestoreTokenConsumer
impl UnwindSafe for RestoreTokenConsumer
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