pub struct LiveQuery<T, E> { /* private fields */ }Expand description
A subscription’s results and lifetime; dropping it ends future runs. Its
results fail with E, the query closure’s own error type.
Implementations§
Source§impl<T: Send + 'static, E: From<DbError> + CarriesBug + Send + 'static> LiveQuery<T, E>
impl<T: Send + 'static, E: From<DbError> + CarriesBug + Send + 'static> LiveQuery<T, E>
Sourcepub async fn next(&mut self) -> Option<Result<T, E>>
pub async fn next(&mut self) -> Option<Result<T, E>>
The first result at once; then only changed results. Errors remain
results and don’t end the query, except the one reporting that the
store closed, the handle failed or a run’s error carries a bug, as a
panic’s does: after it, None.
Sourcepub fn runs(&self) -> LiveQueryRuns
pub fn runs(&self) -> LiveQueryRuns
How often this query has run so far.
Sourcepub fn is_marked_for_rerun(&self) -> bool
pub fn is_marked_for_rerun(&self) -> bool
Whether a commit since this idle query’s last result changes what it reads, so asking for its next result runs it again, with no waiting.
Auto Trait Implementations§
impl<T, E> Freeze for LiveQuery<T, E>where
T: Freeze,
impl<T, E> !RefUnwindSafe for LiveQuery<T, E>
impl<T, E> Send for LiveQuery<T, E>where
T: Send,
impl<T, E> !Sync for LiveQuery<T, E>
impl<T, E> Unpin for LiveQuery<T, E>where
T: Unpin,
impl<T, E> UnsafeUnpin for LiveQuery<T, E>where
T: UnsafeUnpin,
impl<T, E> !UnwindSafe for LiveQuery<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