#macro #trait #object #heap

trait_enum_macro

A macro that allows creating an enum that acts similar to a trait object, but without using the heap

1 unstable release

0.1.0 Feb 23, 2019

#515 in Rust patterns

GPL-3.0+

14KB
51 lines

A macro that allows creating an enum that acts similar to a trait object, but without using the heap.

See: https://singpolyma.net/2018/09/rust-factory-without-box-trait-object/

No runtime deps