Why Nostr? What is Njump?
2024-03-19 07:09:53
in reply to

npub1ma…y8xwp on Nostr: npub1eqghr…6fncn I don't think a comparison with rust really works here. If I ...

I don't think a comparison with rust really works here. If I understand you correctly, what you're describing is a method that returns an object of a class, but the concrete object you get back is an object of the subclass. It only makes sense that you need to downcast in that case. impl in Rust works quite differently and you can't downcast from that, the information is gone at that point, you won't ever be able to call methods specific to HtlmElement in Rust if you return impl Element.
Author Public Key
npub1mauz593vxrnh3flgzs2d47x6aw33e8y3xg0agss0wvay6daz8npq4y8xwp