MultiAny
multi-any provides a trait MultiAny that allows downcasting a Box<dyn MultiAny> to either a concrete type or a trait object. Structs can derive MultiAny for multiple traits using the provided procedural macro.
Example
use *;
// Traits must be annotated with `#[multi_any]`
// With the "nightly" feature, this is not required
// MultiAny can be derived; implemented traits must be specified
;
// Convert Box<Foo> to Box<dyn MultiAny>
let foo: = Boxnew;
// downcast to concrete type
let foo_ref: &Foo = foo.downcast_ref.unwrap;
// downcast to trait object
let trait_ref = foo..unwrap;
// downcast to Box
let foo: = foo.downcast.unwrap;