Skip to main content

Module callback

Module callback 

Source
Expand description

User frame-callback wrapper.

FrameCallback type-erases a user closure into a boxed trait object that accepts a Frame for any lifetime. It is delivered to the user on whatever thread the adapter fires the callback on, so the closure must be Send + Sync + 'static.

The adapter-side trampolines (extern "C" fn in vmb-ffi; synchronous dispatch in vmb-fake) hold references to FrameCallback values via a registry keyed by crate::FrameCallbackId and invoke them via FrameCallback::invoke.

Structsยง

FrameCallback
User-provided frame callback, type-erased into a boxed trait object.