Add support for Rust Standard traits
Fixes #28 (closed).
- Added generation logic for methods like
toString
,equals
, andhashCode
toObjectTemplate.kt
depending on the existence of Rust standard traits exports, which was added in UniFFI 0.24. - Copied the corresponding unit test
trait-methods
from the original UniFFI repo.
This PR is based on !28 (merged) because we need to build unit tests with library mode to test Rust standard trait exports as upstream duplicates the trait method overloads when the library is built without library mode. For more information, please read #28 (closed).