pub struct NoWriteHooks;Expand description
The hooks of a service that has none: every write runs in its transaction and nothing more.
Trait Implementations§
Source§impl Clone for NoWriteHooks
impl Clone for NoWriteHooks
impl Copy for NoWriteHooks
Source§impl Debug for NoWriteHooks
impl Debug for NoWriteHooks
Source§impl Default for NoWriteHooks
impl Default for NoWriteHooks
Source§impl<E: PersistentEntity> WriteHooks<E> for NoWriteHooks
impl<E: PersistentEntity> WriteHooks<E> for NoWriteHooks
Source§fn outbox_schema(&self) -> Option<&str>
fn outbox_schema(&self) -> Option<&str>
The Postgres schema whose
outbox_events table WriteCtx::stage writes to. None
(the default) means these hooks stage nothing.Source§fn before<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 WriteCtx,
change: &'life2 mut Change<'life3, E>,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn before<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 WriteCtx,
change: &'life2 mut Change<'life3, E>,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Before the repository writes
change: may refuse it, and may fill fields of the row to
be stored. Runs after the guard and ServiceLifecycle::before_*.Source§fn after<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 WriteCtx,
change: &'life2 Change<'life3, E>,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn after<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 WriteCtx,
change: &'life2 Change<'life3, E>,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
After the repository wrote
change, still inside the transaction: the place to stage
events and to write rows that must commit with it. Runs after
ServiceLifecycle::after_*.Auto Trait Implementations§
impl Freeze for NoWriteHooks
impl RefUnwindSafe for NoWriteHooks
impl Send for NoWriteHooks
impl Sync for NoWriteHooks
impl Unpin for NoWriteHooks
impl UnsafeUnpin for NoWriteHooks
impl UnwindSafe for NoWriteHooks
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,
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 more