Type Definition sixtyfps_rendering_backend_qt::NativeWidgets [−][src]
type NativeWidgets = (NativeButton, (NativeCheckBox, (NativeSlider, (NativeSpinBox, (NativeGroupBox, (NativeLineEdit, (NativeScrollView, (NativeStandardListViewItem, (NativeComboBox, ())))))))));
NativeWidgets and NativeGlobals are “type list” containing all the native widgets and global types.
It is built as a tuple (Type, Tail)
where Tail
is also a “type list”. a ()
is the end.
So it can be used like this to do something for all types:
trait DoSomething { fn do_something(/*...*/) { /*...*/ } } impl DoSomething for () {} impl<T: sixtyfps_corelib::rtti::BuiltinItem, Next: DoSomething> DoSomething for (T, Next) { fn do_something(/*...*/) { /*...*/ Next::do_something(/*...*/); } } sixtyfps_rendering_backend_qt::NativeWidgets::do_something(/*...*/)