pub trait ChunkListener: Send + Sync {
// Required methods
fn before_chunk<'a>(
&'a self,
context: ChunkListenerContext<'a>,
) -> BoxFuture<'a, Result<(), ChunkListenerError>>;
fn after_chunk<'a>(
&'a self,
context: ChunkListenerContext<'a>,
outcome: ChunkAttemptOutcome,
) -> BoxFuture<'a, Result<(), ChunkListenerError>>;
}Expand description
Observes a chunk attempt around its transaction body.
Required Methods§
Sourcefn before_chunk<'a>(
&'a self,
context: ChunkListenerContext<'a>,
) -> BoxFuture<'a, Result<(), ChunkListenerError>>
fn before_chunk<'a>( &'a self, context: ChunkListenerContext<'a>, ) -> BoxFuture<'a, Result<(), ChunkListenerError>>
Runs before the transaction begins.
Sourcefn after_chunk<'a>(
&'a self,
context: ChunkListenerContext<'a>,
outcome: ChunkAttemptOutcome,
) -> BoxFuture<'a, Result<(), ChunkListenerError>>
fn after_chunk<'a>( &'a self, context: ChunkListenerContext<'a>, outcome: ChunkAttemptOutcome, ) -> BoxFuture<'a, Result<(), ChunkListenerError>>
Runs after commit, rollback, stop, or an unknown commit result.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".