pub struct Changes { /* private fields */ }Expand description
The changes as they happen: Changes::next waits for the next ones.
Implementations§
Source§impl Changes
impl Changes
Sourcepub async fn next(&mut self) -> Result<Vec<Change>, DbError>
pub async fn next(&mut self) -> Result<Vec<Change>, DbError>
Waits for the next changes, each once, in order. A lost listening connection is
re-established, and what changed meanwhile comes as Change::Missed, once the
connection listens again.
§Errors
DbError if the database fails (polling) or the connection can’t be re-established.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Changes
impl !UnwindSafe for Changes
impl Freeze for Changes
impl Send for Changes
impl Sync for Changes
impl Unpin for Changes
impl UnsafeUnpin for Changes
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more