pub trait DerivationStyle:
Copy
+ Eq
+ Hash
+ Default
+ Debug
+ Display
+ FromStr<Err = ParseDerivationStyleError>
+ 'static {
// Required methods
fn path(self, index: u32) -> String;
fn name(self) -> &'static str;
fn all() -> &'static [Self];
}Expand description
Trait implemented by every chain’s DerivationStyle enum.
See the crate-level documentation for the full cross-chain contract.
Required Methods§
Sourcefn path(self, index: u32) -> String
fn path(self, index: u32) -> String
Build the BIP-32 / SLIP-10 derivation path for account index.
The returned String is owned because most call sites immediately
feed it into a bip32 / slip10 parser that needs &str; the
one-alloc-per-derivation cost is negligible against the
secp256k1 / ed25519 key math that follows.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.