pub trait IntoCallback<C, E, Params> {
type Callback: Handler<E>;
// Required method
fn into_callback(self, ctx: C, registry: &mut Registry) -> Self::Callback;
}Expand description
Converts a named function into a Callback.
Identical to IntoHandler but injects &mut C as
the first parameter. ResourceIds resolved via
registry.id::<T>() at call time — panics if any resource is not
registered.
§Named functions only
Closures do not work with IntoCallback due to Rust’s HRTB inference
limitations with GATs. Use named fn items instead.
§Panics
Panics if any SystemParam resource is not registered.
Required Associated Types§
Required Methods§
Sourcefn into_callback(self, ctx: C, registry: &mut Registry) -> Self::Callback
fn into_callback(self, ctx: C, registry: &mut Registry) -> Self::Callback
Convert this function + context into a Callback.