Module scrypto::resource::resource_builder::private
source · Expand description
This file was experiencing combinatorial explosion - as part of the clean-up, we’ve used private traits to keep things simple.
Each public method has essentially one implementation, and one Rust doc (where there weren’t clashes due to Rust trait issues -
eg with the mint_initial_supply
methods).
Internally, the various builders implement these private traits, and then automatically implement the “nice” public traits. The methods defined in the private traits are less nice, and so are hidden in order to not pollute the user facing API.
As users will nearly always use scrypto::prelude::*
, as long as we make sure that the public traits are exported, this will
be seamless for the user.
See https://stackoverflow.com/a/53207767 for more information on this.