Trait FusionObserver
pub trait FusionObserver: Send + Sync {
// Required methods
fn registered(&self, operation: &OperationIr);
fn block_starts(&self, block: BlockOperations<'_>);
fn block_ran(&self);
}Expand description
Notified of every operation the fusion server registers and every block of them it runs, on the server’s thread.
Implementations must be cheap and must not register operations or install
or drop a FusionObservation: they run inside the server, which is
processing the call that reached them. The same goes for their Drop, which
runs on the server’s thread when a notification in flight holds the last
reference.
Required Methods§
fn registered(&self, operation: &OperationIr)
fn registered(&self, operation: &OperationIr)
operation was registered, in registration order, before anything its
registration triggers runs.
fn block_starts(&self, block: BlockOperations<'_>)
fn block_starts(&self, block: BlockOperations<'_>)
block is about to run. Every kernel it launches is issued on this
thread before block_ran.
fn block_ran(&self)
fn block_ran(&self)
The block that last started has finished — run, skipped because an input carried a failure, or failed itself.
Must not panic: it also runs while a panic out of the block unwinds, where a second one aborts the process.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".