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
Type Widget::Data is passed by reference and must have lifetime exceeding the widget (i.e. usually 'static). Implications:
We cannot generate input data on-the-fly; it must be stored in the widget tree somewhere (e.g. it may be generated and cached by fn Events::update).
We cannot pass multiple references as input data.
The generic solution to this would be to make type Widget::Data a GAT over a lifetime parameter, but Rust does not currently support usage of GATs in dyn-safe traits (see also #25) and we require that Widget be dyn-safe.
There may be other (partial) solutions, but any evaluated solutions are worse than forcing widgets to work around this limitation. (This might continue to be the case even if Rust does support dyn-safe lifetime GATs, but should be re-evaluated.)
The text was updated successfully, but these errors were encountered:
Type
Widget::Data
is passed by reference and must have lifetime exceeding the widget (i.e. usually'static
). Implications:fn Events::update
).The generic solution to this would be to make
type Widget::Data
a GAT over a lifetime parameter, but Rust does not currently support usage of GATs indyn
-safe traits (see also #25) and we require thatWidget
bedyn
-safe.There may be other (partial) solutions, but any evaluated solutions are worse than forcing widgets to work around this limitation. (This might continue to be the case even if Rust does support
dyn
-safe lifetime GATs, but should be re-evaluated.)The text was updated successfully, but these errors were encountered: