macro_rules! make_trait_castable_decl {
($($source:ty => ($($target:path),* $(,)?)),+$(,)?) => { ... };
}Expand description
Declarative macro for automatic implementation of TraitcastableAny (and TraitcastableTo).
Generally not for direct invocation, but rather used by the proc-macro make_trait_castable.
Syntax: <concrete struct/enum/union> => (<target traits>, ...)
§Usage
ⓘ
make_trait_castable_decl! {
SrcStruct1 => (DstTrait1, DstTrait2),
SrcStruct2 => (DstTrait3, DstTrait4),
}