Would you mind expanding on your example a bit? I'm having trouble understanding your problem and how it relates to storing Box<DynT> in a struct—constructing DynT from something that implements T via DynT's interface seems like it should do the trick?
Also I'm not sure whether I'd consider replacing async-trait with dynosaur a modernisation. Both crates are well maintained and it is not immediately clear to me what benefits the latter has over the former.
No, DynT is unsized, same as dyn T, you need to use it behind a reference type. But you can create Box<DynT> from something that implements T via DynT::boxed.
That's not possible, the dynosaur trait only parsesStructName[ = TraitName] as its attribute, not StructName[ = TraitName[ + Bounds]].[1] AFAICT, OP could either use trait-variant or make Send and Sync supertraits of T manually, if supporting !Send + !Sync implementors is not necessary.
The square brackets should indicate optional content. ↩︎