Function wlan_hw_sim::event::boxed

source ·
pub fn boxed<'h, H, S, E>(
    handler: H
) -> Box<dyn Handler<S, E, Output = H::Output> + 'h>
where H: Handler<S, E> + 'h,
Expand description

Boxes an event handler as a trait object.

This function can be used for dynamic dispatch and conditionals wherein the Handler type parameters and associated types are the same yet the implementing handler types differ. That is, with the exception of the output type, this function erases the handler’s type.