serai-dex / serai

Other
266 stars 49 forks source link

Monero trait methods do not appear in documentation #620

Open hinto-janai opened 1 month ago

hinto-janai commented 1 month ago

What

Some traits within monero-serai are sealed in a manner that prevent public visibility, i.e. they do not appear in cargo doc:

https://github.com/serai-dex/serai/blob/d7ecab605ec20d959d3e1439bf93251f84a6c0ed/networks/monero/src/transaction.rs#L268-L376

Problem

These traits/methods do not appear in cargo doc; users cannot know they exist without looking at source code.

Fix

These traits/methods can be safely exposed by using a sealed trait: https://rust-lang.github.io/api-guidelines/future-proofing.html#sealed-traits-protect-against-downstream-implementations-c-sealed.