anychain_bitcoin::network

Trait BitcoinNetwork

Source
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§

Source

fn to_address_prefix(format: BitcoinFormat) -> Result<Prefix, AddressError>

Returns the address prefix of the given network.

Source

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.

Implementors§