pub trait BitcoinNetwork: Network {
// Required methods
fn to_address_prefix(format: BitcoinFormat) -> Result<Prefix, AddressError>;
fn from_address_prefix(prefix: Prefix) -> Result<Self, AddressError>;
}Expand description
The interface for a Bitcoin network.
Required Methods§
Sourcefn to_address_prefix(format: BitcoinFormat) -> Result<Prefix, AddressError>
fn to_address_prefix(format: BitcoinFormat) -> Result<Prefix, AddressError>
Returns the address prefix of the given network.
Sourcefn from_address_prefix(prefix: Prefix) -> Result<Self, AddressError>
fn from_address_prefix(prefix: Prefix) -> Result<Self, AddressError>
Returns the network of the given address prefix.
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.