pub struct CallbackSet { /* private fields */ }Expand description
Ordered list of Callback objects attached to a session.
Callbacks fire in insertion order. This mirrors oa::Iterator::addCallback
but is an explicit value rather than a virtual base member so the concrete
session type can own it directly.
Implementations§
Source§impl CallbackSet
impl CallbackSet
Sourcepub fn add(&mut self, cb: Box<dyn Callback>)
pub fn add(&mut self, cb: Box<dyn Callback>)
Append a callback. Callbacks fire in insertion order.
Sourcepub fn fire_begin(&mut self, ctx: &dyn IteratorContext)
pub fn fire_begin(&mut self, ctx: &dyn IteratorContext)
Fire on_begin on all callbacks in order.
Sourcepub fn fire_step(&mut self, ctx: &dyn IteratorContext)
pub fn fire_step(&mut self, ctx: &dyn IteratorContext)
Fire on_step on all callbacks in order.
Sourcepub fn fire_end(&mut self, ctx: &dyn IteratorContext)
pub fn fire_end(&mut self, ctx: &dyn IteratorContext)
Fire on_end on all callbacks in order.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CallbackSet
impl !Sync for CallbackSet
impl !UnwindSafe for CallbackSet
impl Forget for CallbackSet
impl Freeze for CallbackSet
impl Move for CallbackSet
impl Send for CallbackSet
impl Unpin for CallbackSet
impl UnsafeUnpin for CallbackSet
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