Skip to main content

Virtual

Type Alias Virtual 

Source
pub type Virtual<E> = Box<dyn Handler<E>>;
Expand description

Type alias for a boxed, type-erased Handler.

Use Virtual<E> when you need to store heterogeneous handlers in a collection (e.g. Vec<Virtual<E>>). One heap allocation per handler.

For inline storage (no heap), see FlatVirtual (panics if handler doesn’t fit) or FlexVirtual (inline with heap fallback). Both require the smartptr feature.

Aliased Type§

pub struct Virtual<E>(/* private fields */);