pub trait DecoderHooks: Send + Sync {
// Required methods
fn on_chunk(&mut self, signal: ReaderChunkSignal);
fn on_seek(&mut self, signal: ReaderSeekSignal);
}Expand description
Reader-side hooks invoked by the decoder layer’s HookedDecoder
right before it forwards the inner decoder’s typed outcome to the
caller.
One call per next_chunk / seek — granularity is decoder
operations, not byte-level reads.
Required Methods§
Sourcefn on_chunk(&mut self, signal: ReaderChunkSignal)
fn on_chunk(&mut self, signal: ReaderChunkSignal)
Called once per next_chunk after the inner decoder produced
an outcome.
Sourcefn on_seek(&mut self, signal: ReaderSeekSignal)
fn on_seek(&mut self, signal: ReaderSeekSignal)
Called once per seek after the inner decoder parked at the
destination (or signalled PastEof).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".