You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each instance of ListStore and ListModel works on a concrete and fixed item type. Currently this is handled by checking and passing around a glib Type value. In Rust this can be expressed more elegantly by a type parameter. The big advantage is that there is no more fallible casting when using the different methods on these instances and Rust’s type system can be leveraged for e.g. type inference.
You'd need to add some API for casting between ListModel<T> and ListModel<U> too then, and either needs to make sure that the type is a supertype (not subtype!) of the model's item type.
I think this would improve the API considerably but it also means that the bindings can't be autogenerated anymore (nothing where ListModel or ListStore appears in the API).
Each instance of
ListStore
andListModel
works on a concrete and fixed item type. Currently this is handled by checking and passing around a glibType
value. In Rust this can be expressed more elegantly by a type parameter. The big advantage is that there is no more fallible casting when using the different methods on these instances and Rust’s type system can be leveraged for e.g. type inference.Before
After
The text was updated successfully, but these errors were encountered: