pub struct Updated<M> {
pub model: M,
pub changes: Changes<M>,
}Expand description
The event that an update dispatches after writing changes.
An update that changes nothing doesn’t dispatch the event. In a queued listener, model is the
row as the worker reads it, and changes holds only the names of the changed columns.
Fields§
§model: MThe model with its changes.
changes: Changes<M>The columns whose values changed, including updated_at when the update set it. A queued
listener gets only the columns’ names.
Trait Implementations§
impl<M> Queueable for Updated<M>where
M: Model,
Stored as {"model": 42, "changes": ["email", "updated_at"]}, with the names of the changed
columns but not their values. The worker reads the row again.
Auto Trait Implementations§
impl<M> !RefUnwindSafe for Updated<M>
impl<M> !UnwindSafe for Updated<M>
impl<M> Forget for Updated<M>
impl<M> Freeze for Updated<M>where
M: Freeze,
*const u8 is !null: Freeze,
PhantomData<Change>: Freeze,
PhantomData<&'static str>: Freeze,
impl<M> Move for Updated<M>
impl<M> Send for Updated<M>
impl<M> Sync for Updated<M>
impl<M> Unpin for Updated<M>
impl<M> UnsafeUnpin for Updated<M>where
M: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Change>: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<K> ForeignKey<K> for K
impl<K> ForeignKey<K> for K
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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 moreCreates a shared type from an unshared type.