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
Which is fine, but we can't call these methods because we'd have to specify which exact type T to call them for which we don't know.
And in practice knowing the type T shouldn't be necessary because the "idl gen helper methods" don't rely on T. It's just that rust won't allow us to call them without specifying T.
But we can go around this by generating an empty placeholder type and then do impl on it instead of the original type:
The compile IDL generation method (#2011) doesn't work for types with generics.
The code it generates is similar to this:
When the type has generics it will generate this:
Which is fine, but we can't call these methods because we'd have to specify which exact type T to call them for which we don't know.
And in practice knowing the type T shouldn't be necessary because the "idl gen helper methods" don't rely on T. It's just that rust won't allow us to call them without specifying T.
But we can go around this by generating an empty placeholder type and then do impl on it instead of the original type:
Then we call the methods on the placeholder type instead of the original one.
The text was updated successfully, but these errors were encountered: