oa::Callback

Keras-style hook interface for OA iterator sessions. Attach one or more callbacks to a session via its add_callback method. All hooks receive a &dyn IteratorContext so callbacks stay decoupled from the concrete session type. Mapping from C++C++Rust onBegin(Iterator&)on_begin(&mut self, ctx) onStep(Iterator&)on_step(&mut self, ctx) onEnd(Iterator&)on_end(&mut self, ctx) C++ used virtual inheritance; Rust uses dynamic dispatch through Box<dyn Callback>. The C++ move-constructor convention maps to Rust’s normal ownership — place Box<dyn Callback> values in a Vec rather than raw pointers.

TrRust public API

Declaration

pub trait Callback: Send { // Provided methods fn on_begin(&mut self, _ctx: &dyn IteratorContext) { ... } fn on_step(&mut self, _ctx: &dyn IteratorContext) { ... } fn on_end(&mut self, _ctx: &dyn IteratorContext) { ... } }
Public Rust declaration.

Public Methods

fn on_begin(&mut self, _ctx: &dyn IteratorContext)
fn on_step(&mut self, _ctx: &dyn IteratorContext)
fn on_end(&mut self, _ctx: &dyn IteratorContext)

Public Method Documentation

fn on_begin( &mut self, _ctx: &dyn IteratorContext )
No public source comment is attached to this declaration.
fn on_step( &mut self, _ctx: &dyn IteratorContext )
No public source comment is attached to this declaration.
fn on_end( &mut self, _ctx: &dyn IteratorContext )
No public source comment is attached to this declaration.