Macro sixtyfps_corelib::ItemVisitorVTable_static [−][src]
macro_rules! ItemVisitorVTable_static { #[vtable] => { ... }; }
Instantiate a static ItemVisitorVTable for a given type and implements vtable::HasStaticVTable<ItemVisitorVTable>
for it.
ⓘ
// The preview above is misleading because of rust-lang/rust#45939, so it is reproctuced bellow macro_rules! ItemVisitorVTable_static { ($(#[$meta:meta])* $vis:vis static $ident:ident for $ty:ty) => { ... } }
Given a type MyType
that implements the trait ItemVisitor
,
create a static variable of type ItemVisitorVTable,
and implements HasStaticVTable for it.
ⓘ
struct Foo { ... } impl ItemVisitor for Foo { ... } ItemVisitorVTable_static!(static FOO_VTABLE for Foo); // now VBox::new can be called let vbox = VBox::new(Foo{ ... });
Note: Was generated from the #[vtable]
macro on ItemVisitorVTable