Skip to main content

bundle

Attribute Macro bundle 

Source
#[bundle]
Expand description

Transform attached enum into a “bundle”.

What is a bundle?

Bundles are used to accomplish dynamic dispatch in resource constrained systems (no_std). A bundle can hold a finite number of types that implement a common trait. The size of the bundle is known at compile time and equal to the size of the largest type in the bundle. Bundles are useful for type-erasure when transporting multiple types pseudo-heterogeneously.